Browse Source

Some fixes

pull/1165/head
Markus Unterwaditzer 10 years ago
parent
commit
df711eac90
  1. 3
      .travis.yml
  2. 16
      tests/test_config.py
  3. 6
      tox.ini

3
.travis.yml

@ -17,6 +17,9 @@ matrix:
# Python 3 support currently does not work with lowest requirements
- python: "3.3"
env: REQUIREMENTS=lowest
- python: "3.4"
env: REQUIREMENTS=lowest
install:
- pip install hg+https://bitbucket.org/hpk42/tox

16
tests/test_config.py

@ -344,23 +344,23 @@ class TestInstance(TestFlask):
if 'site_package' in sys.modules:
del sys.modules['site_package']
def test_egg_installed_paths(self):
def test_egg_installed_paths(self, monkeypatch):
here = os.path.abspath(os.path.dirname(__file__))
expected_prefix = os.path.join(here, 'test_apps')
real_prefix, sys.prefix = sys.prefix, expected_prefix
site_packages = os.path.join(expected_prefix, 'lib', 'python2.5', 'site-packages')
monkeypatch.setattr(sys, 'prefix', expected_prefix)
site_packages = os.path.join(expected_prefix, 'lib', 'python2.5',
'site-packages')
egg_path = os.path.join(site_packages, 'SiteEgg.egg')
sys.path.append(site_packages)
sys.path.append(egg_path)
monkeypatch.syspath_prepend(egg_path)
monkeypatch.syspath_prepend(site_packages)
try:
import site_egg # in SiteEgg.egg
self.assert_equal(site_egg.app.instance_path,
os.path.join(expected_prefix, 'var',
'site_egg-instance'))
finally:
sys.prefix = real_prefix
sys.path.remove(site_packages)
sys.path.remove(egg_path)
if 'site_egg' in sys.modules:
del sys.modules['site_egg']

6
tox.ini

@ -1,7 +1,5 @@
[tox]
envlist =
docs
{py26,py27,pypy,py33,py34}-{lowest,release,devel}
envlist = {py26,py27,pypy,py33,py34}-{lowest,release,devel}
[testenv]
commands =
@ -11,7 +9,7 @@ deps=
pytest
lowest: Werkzeug==0.7
lowest: Jinja==2.4
lowest: Jinja2==2.4
lowest: itsdangerous==0.21
lowest: blinker==1.0
release: blinker

Loading…
Cancel
Save