diff options
author | David Lord <davidism@gmail.com> | 2016-04-11 16:16:43 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2016-04-11 16:18:24 -0700 |
commit | d760b78a2f74156f6db85f5f50304b906f3f5d6b (patch) | |
tree | 50fffe390c3d91836ea6b5eedda6d1e3dd32d5cd | |
parent | d48cb2129c71fd4b2b29807433a15fe73ae295d3 (diff) | |
download | jinja2-d760b78a2f74156f6db85f5f50304b906f3f5d6b.tar.gz |
standard tox/travis config
fix pytest warning, don't prefix non-testcase classes with Test
-rw-r--r-- | .gitignore | 12 | ||||
-rw-r--r-- | .travis.yml | 11 | ||||
-rw-r--r-- | tests/test_ext.py | 8 | ||||
-rw-r--r-- | tox.ini | 7 |
4 files changed, 18 insertions, 20 deletions
@@ -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 7480435..90aa3d9 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 8985416..f49c09c 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): @@ -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 |