From: David Lord Date: Mon, 11 Apr 2016 23:16:43 +0000 (-0700) Subject: standard tox/travis config X-Git-Tag: 2.9~27^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d760b78a2f74156f6db85f5f50304b906f3f5d6b;p=thirdparty%2Fjinja.git standard tox/travis config fix pytest warning, don't prefix non-testcase classes with Test --- diff --git a/.gitignore b/.gitignore index 3ae1fa70..8ea95fc9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ *.so -docs/_build +docs/_build/ *.pyc *.pyo -*.egg-info +*.egg-info/ *.egg -build -dist +build/ +dist/ .DS_Store -.tox +.tox/ +.cache/ +.idea/ diff --git a/.travis.yml b/.travis.yml index 74804351..90aa3d9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,22 +3,19 @@ language: python python: - "2.6" - "2.7" + - pypy - "3.3" - "3.4" - "3.5" - - "pypy" - install: - - pip install tox + - pip install tox script: - - tox -e \ - $(echo $TRAVIS_PYTHON_VERSION | sed 's/^\([0-9]\)\.\([0-9]\).*/py\1\2/') - + - tox -e py notifications: email: false irc: channels: - - "chat.freenode.net#pocoo" + - chat.freenode.net#pocoo on_success: change on_failure: always use_notice: true diff --git a/tests/test_ext.py b/tests/test_ext.py index 8985416c..f49c09c9 100644 --- a/tests/test_ext.py +++ b/tests/test_ext.py @@ -99,7 +99,7 @@ newstyle_i18n_env = Environment( newstyle_i18n_env.install_gettext_callables(gettext, ngettext, newstyle=True) -class TestExtension(Extension): +class ExampleExtension(Extension): tags = set(['test']) ext_attr = 42 @@ -207,15 +207,15 @@ class TestExtensions(): == ['42 = 23', '1 = 2'] def test_extension_nodes(self): - env = Environment(extensions=[TestExtension]) + env = Environment(extensions=[ExampleExtension]) tmpl = env.from_string('{% test %}') assert tmpl.render() == 'False|42|23|{}' def test_identifier(self): - assert TestExtension.identifier == __name__ + '.TestExtension' + assert ExampleExtension.identifier == __name__ + '.ExampleExtension' def test_rebinding(self): - original = Environment(extensions=[TestExtension]) + original = Environment(extensions=[ExampleExtension]) overlay = original.overlay() for env in original, overlay: for ext in itervalues(env.extensions): diff --git a/tox.ini b/tox.ini index 0daabf75..388fb054 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,8 @@ [tox] -envlist = py26, py27, pypy, py33, py34, py35 +envlist = py26,py27,pypy,py33,py34,py35 [testenv] -commands = - py.test [] +commands = py.test {posargs} deps = - pytest + pytest