diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | setup.py | 5 | ||||
-rw-r--r-- | tests/conftest.py (renamed from testsuite/conftest.py) | 0 | ||||
-rw-r--r-- | tests/res/__init__.py (renamed from testsuite/res/__init__.py) | 0 | ||||
-rw-r--r-- | tests/res/templates/broken.html (renamed from testsuite/res/templates/broken.html) | 0 | ||||
-rw-r--r-- | tests/res/templates/foo/test.html (renamed from testsuite/res/templates/foo/test.html) | 0 | ||||
-rw-r--r-- | tests/res/templates/syntaxerror.html (renamed from testsuite/res/templates/syntaxerror.html) | 0 | ||||
-rw-r--r-- | tests/res/templates/test.html (renamed from testsuite/res/templates/test.html) | 0 | ||||
-rw-r--r-- | tests/test_api.py (renamed from testsuite/test_api.py) | 18 | ||||
-rw-r--r-- | tests/test_bytecode_cache.py (renamed from testsuite/test_bytecode_cache.py) | 0 | ||||
-rw-r--r-- | tests/test_core_tags.py (renamed from testsuite/test_core_tags.py) | 0 | ||||
-rw-r--r-- | tests/test_debug.py (renamed from testsuite/test_debug.py) | 0 | ||||
-rw-r--r-- | tests/test_ext.py (renamed from testsuite/test_ext.py) | 0 | ||||
-rw-r--r-- | tests/test_filters.py (renamed from testsuite/test_filters.py) | 0 | ||||
-rw-r--r-- | tests/test_imports.py (renamed from testsuite/test_imports.py) | 0 | ||||
-rw-r--r-- | tests/test_inheritance.py (renamed from testsuite/test_inheritance.py) | 0 | ||||
-rw-r--r-- | tests/test_lexnparse.py (renamed from testsuite/test_lexnparse.py) | 0 | ||||
-rw-r--r-- | tests/test_loader.py (renamed from testsuite/test_loader.py) | 0 | ||||
-rw-r--r-- | tests/test_regression.py (renamed from testsuite/test_regression.py) | 0 | ||||
-rw-r--r-- | tests/test_security.py (renamed from testsuite/test_security.py) | 0 | ||||
-rw-r--r-- | tests/test_tests.py (renamed from testsuite/test_tests.py) | 0 | ||||
-rw-r--r-- | tests/test_utils.py (renamed from testsuite/test_utils.py) | 0 | ||||
-rw-r--r-- | tox.ini | 6 |
23 files changed, 16 insertions, 15 deletions
@@ -1,5 +1,5 @@ test: - py.test --doctest-modules testsuite jinja2 + py.test develop: pip install --editable . @@ -72,10 +72,7 @@ setup( 'Topic :: Text Processing :: Markup :: HTML' ], packages=['jinja2'], - install_requires=[ - 'MarkupSafe', - 'pytest' - ], + install_requires=['MarkupSafe'], extras_require={'i18n': ['Babel>=0.8']}, include_package_data=True, entry_points=""" diff --git a/testsuite/conftest.py b/tests/conftest.py index b5582323..b5582323 100644 --- a/testsuite/conftest.py +++ b/tests/conftest.py diff --git a/testsuite/res/__init__.py b/tests/res/__init__.py index e69de29b..e69de29b 100644 --- a/testsuite/res/__init__.py +++ b/tests/res/__init__.py diff --git a/testsuite/res/templates/broken.html b/tests/res/templates/broken.html index 77669fae..77669fae 100644 --- a/testsuite/res/templates/broken.html +++ b/tests/res/templates/broken.html diff --git a/testsuite/res/templates/foo/test.html b/tests/res/templates/foo/test.html index b7d6715e..b7d6715e 100644 --- a/testsuite/res/templates/foo/test.html +++ b/tests/res/templates/foo/test.html diff --git a/testsuite/res/templates/syntaxerror.html b/tests/res/templates/syntaxerror.html index f21b8179..f21b8179 100644 --- a/testsuite/res/templates/syntaxerror.html +++ b/tests/res/templates/syntaxerror.html diff --git a/testsuite/res/templates/test.html b/tests/res/templates/test.html index ba578e48..ba578e48 100644 --- a/testsuite/res/templates/test.html +++ b/tests/res/templates/test.html diff --git a/testsuite/test_api.py b/tests/test_api.py index 37617f2a..40a6b3dc 100644 --- a/testsuite/test_api.py +++ b/tests/test_api.py @@ -188,7 +188,7 @@ class TestStreaming(): @pytest.mark.undefined class TestUndefined(): - def test_stopiteration_is_undefined(self, env): + def test_stopiteration_is_undefined(self): def test(): raise StopIteration() t = Template('A{{ test() }}B') @@ -196,7 +196,7 @@ class TestUndefined(): t = Template('A{{ test().missingattribute }}B') pytest.raises(UndefinedError, t.render, test=test) - def test_undefined_and_special_attributes(self, env): + def test_undefined_and_special_attributes(self): try: Undefined('Foo').__dict__ except AttributeError: @@ -204,7 +204,7 @@ class TestUndefined(): else: assert False, "Expected actual attribute error" - def test_logging_undefined(self, env): + def test_logging_undefined(self): _messages = [] class DebugLogger(object): @@ -232,7 +232,7 @@ class TestUndefined(): 'W:Template variable warning: missing is undefined', ] - def test_default_undefined(self, env): + def test_default_undefined(self): env = Environment(undefined=Undefined) assert env.from_string('{{ missing }}').render() == u'' pytest.raises(UndefinedError, @@ -243,7 +243,7 @@ class TestUndefined(): assert env.from_string('{{ foo.missing }}').render(foo=42) == '' assert env.from_string('{{ not missing }}').render() == 'True' - def test_debug_undefined(self, env): + def test_debug_undefined(self): env = Environment(undefined=DebugUndefined) assert env.from_string('{{ missing }}').render() == '{{ missing }}' pytest.raises(UndefinedError, @@ -255,7 +255,7 @@ class TestUndefined(): == u"{{ no such element: int object['missing'] }}" assert env.from_string('{{ not missing }}').render() == 'True' - def test_strict_undefined(self, env): + def test_strict_undefined(self): env = Environment(undefined=StrictUndefined) pytest.raises(UndefinedError, env.from_string('{{ missing }}').render) pytest.raises(UndefinedError, @@ -271,11 +271,11 @@ class TestUndefined(): assert env.from_string('{{ missing|default("default", true) }}')\ .render() == 'default' - def test_indexing_gives_undefined(self, env): + def test_indexing_gives_undefined(self): t = Template("{{ var[42].foo }}") pytest.raises(UndefinedError, t.render, var=0) - def test_none_gives_proper_error(self, env): + def test_none_gives_proper_error(self): try: Environment().getattr(None, 'split')() except UndefinedError as e: @@ -283,7 +283,7 @@ class TestUndefined(): else: assert False, 'expected exception' - def test_object_repr(self, env): + def test_object_repr(self): try: Undefined(obj=42, name='upper')() except UndefinedError as e: diff --git a/testsuite/test_bytecode_cache.py b/tests/test_bytecode_cache.py index 2ffe4c60..2ffe4c60 100644 --- a/testsuite/test_bytecode_cache.py +++ b/tests/test_bytecode_cache.py diff --git a/testsuite/test_core_tags.py b/tests/test_core_tags.py index 2ea7757e..2ea7757e 100644 --- a/testsuite/test_core_tags.py +++ b/tests/test_core_tags.py diff --git a/testsuite/test_debug.py b/tests/test_debug.py index d8617ae0..d8617ae0 100644 --- a/testsuite/test_debug.py +++ b/tests/test_debug.py diff --git a/testsuite/test_ext.py b/tests/test_ext.py index 8985416c..8985416c 100644 --- a/testsuite/test_ext.py +++ b/tests/test_ext.py diff --git a/testsuite/test_filters.py b/tests/test_filters.py index 42c55583..42c55583 100644 --- a/testsuite/test_filters.py +++ b/tests/test_filters.py diff --git a/testsuite/test_imports.py b/tests/test_imports.py index 643c995c..643c995c 100644 --- a/testsuite/test_imports.py +++ b/tests/test_imports.py diff --git a/testsuite/test_inheritance.py b/tests/test_inheritance.py index 1cb73904..1cb73904 100644 --- a/testsuite/test_inheritance.py +++ b/tests/test_inheritance.py diff --git a/testsuite/test_lexnparse.py b/tests/test_lexnparse.py index ff334bf0..ff334bf0 100644 --- a/testsuite/test_lexnparse.py +++ b/tests/test_lexnparse.py diff --git a/testsuite/test_loader.py b/tests/test_loader.py index 6d22fad3..6d22fad3 100644 --- a/testsuite/test_loader.py +++ b/tests/test_loader.py diff --git a/testsuite/test_regression.py b/tests/test_regression.py index a4aa1571..a4aa1571 100644 --- a/testsuite/test_regression.py +++ b/tests/test_regression.py diff --git a/testsuite/test_security.py b/tests/test_security.py index e5b463fc..e5b463fc 100644 --- a/testsuite/test_security.py +++ b/tests/test_security.py diff --git a/testsuite/test_tests.py b/tests/test_tests.py index 9e54038c..9e54038c 100644 --- a/testsuite/test_tests.py +++ b/tests/test_tests.py diff --git a/testsuite/test_utils.py b/tests/test_utils.py index 37310361..37310361 100644 --- a/testsuite/test_utils.py +++ b/tests/test_utils.py @@ -2,4 +2,8 @@ envlist = py26, py27, pypy, py33, py34 [testenv] -commands = py.test --doctest-modules testsuite jinja2 +commands = + py.test [] + +deps = + pytest |