standard tox/travis config

fix pytest warning, don't prefix non-testcase classes with Test
This commit is contained in:
David Lord 2016-04-11 16:16:43 -07:00
parent d48cb2129c
commit d760b78a2f
4 changed files with 18 additions and 20 deletions

12
.gitignore vendored
View File

@ -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/

View File

@ -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

View File

@ -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):

View File

@ -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