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 support currently does not work with lowest requirements
- python: "3.3" - python: "3.3"
env: REQUIREMENTS=lowest env: REQUIREMENTS=lowest
- python: "3.4"
env: REQUIREMENTS=lowest
install: install:
- pip install hg+https://bitbucket.org/hpk42/tox - 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: if 'site_package' in sys.modules:
del sys.modules['site_package'] 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__)) here = os.path.abspath(os.path.dirname(__file__))
expected_prefix = os.path.join(here, 'test_apps') expected_prefix = os.path.join(here, 'test_apps')
real_prefix, sys.prefix = sys.prefix, expected_prefix monkeypatch.setattr(sys, 'prefix', expected_prefix)
site_packages = os.path.join(expected_prefix, 'lib', 'python2.5', 'site-packages')
site_packages = os.path.join(expected_prefix, 'lib', 'python2.5',
'site-packages')
egg_path = os.path.join(site_packages, 'SiteEgg.egg') egg_path = os.path.join(site_packages, 'SiteEgg.egg')
sys.path.append(site_packages) monkeypatch.syspath_prepend(egg_path)
sys.path.append(egg_path) monkeypatch.syspath_prepend(site_packages)
try: try:
import site_egg # in SiteEgg.egg import site_egg # in SiteEgg.egg
self.assert_equal(site_egg.app.instance_path, self.assert_equal(site_egg.app.instance_path,
os.path.join(expected_prefix, 'var', os.path.join(expected_prefix, 'var',
'site_egg-instance')) 'site_egg-instance'))
finally: finally:
sys.prefix = real_prefix
sys.path.remove(site_packages)
sys.path.remove(egg_path)
if 'site_egg' in sys.modules: if 'site_egg' in sys.modules:
del sys.modules['site_egg'] del sys.modules['site_egg']

6
tox.ini

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

Loading…
Cancel
Save