]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Cleaned up shitty syntax in testsuite
authorArmin Ronacher <armin.ronacher@active-4.com>
Fri, 6 Jan 2017 20:00:01 +0000 (21:00 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Fri, 6 Jan 2017 20:00:01 +0000 (21:00 +0100)
tests/test_api.py
tests/test_bytecode_cache.py
tests/test_ext.py
tests/test_imports.py
tests/test_inheritance.py
tests/test_lexnparse.py
tests/test_loader.py
tests/test_regression.py
tests/test_security.py
tests/test_tests.py
tests/test_utils.py

index c358d01b4e2ae892a391c9164b1180840e90ad91..90a143b75314e354f4730ab27f3652705586f4c2 100644 (file)
@@ -23,7 +23,7 @@ from jinja2.utils import Cycler
 
 @pytest.mark.api
 @pytest.mark.extended
-class TestExtendedAPI():
+class TestExtendedAPI(object):
 
     def test_item_and_attribute(self, env):
         from jinja2.sandbox import SandboxedEnvironment
@@ -107,7 +107,7 @@ class TestExtendedAPI():
 
 @pytest.mark.api
 @pytest.mark.meta
-class TestMeta():
+class TestMeta(object):
 
     def test_find_undeclared_variables(self, env):
         ast = env.parse('{% set foo = 42 %}{{ bar + foo }}')
@@ -155,7 +155,7 @@ class TestMeta():
 
 @pytest.mark.api
 @pytest.mark.streaming
-class TestStreaming():
+class TestStreaming(object):
 
     def test_basic_streaming(self, env):
         tmpl = env.from_string("<ul>{% for item in seq %}<li>{{ loop.index "
@@ -199,7 +199,7 @@ class TestStreaming():
 
 @pytest.mark.api
 @pytest.mark.undefined
-class TestUndefined():
+class TestUndefined(object):
 
     def test_stopiteration_is_undefined(self):
         def test():
@@ -309,7 +309,7 @@ class TestUndefined():
 
 @pytest.mark.api
 @pytest.mark.lowlevel
-class TestLowLevel():
+class TestLowLevel(object):
 
     def test_custom_code_generator(self):
         class CustomCodeGenerator(CodeGenerator):
index 2ffe4c60379bc4b3597d3e4d1bfb3292bdedce60..7a601293181cd2bca6d50dcb39cfa658df02e12a 100644 (file)
@@ -24,7 +24,7 @@ def env(package_loader):
 
 
 @pytest.mark.byte_code_cache
-class TestByteCodeCache():
+class TestByteCodeCache(object):
 
     def test_simple(self, env):
         tmpl = env.get_template('test.html')
index 9a5bdfd68db890670c2f73b22157b6c23559a183..3a06a42ea8f2e11372b224a650d1c80644f93879 100644 (file)
@@ -160,7 +160,7 @@ class StreamFilterExtension(Extension):
 
 
 @pytest.mark.ext
-class TestExtensions():
+class TestExtensions(object):
 
     def test_extend_late(self):
         env = Environment()
@@ -246,7 +246,7 @@ class TestExtensions():
 
 
 @pytest.mark.ext
-class TestInternationalization():
+class TestInternationalization(object):
 
     def test_trans(self):
         tmpl = i18n_env.get_template('child.html')
@@ -315,7 +315,7 @@ class TestInternationalization():
 
 
 @pytest.mark.ext
-class TestNewstyleInternationalization():
+class TestNewstyleInternationalization(object):
 
     def test_trans(self):
         tmpl = newstyle_i18n_env.get_template('child.html')
@@ -397,7 +397,7 @@ class TestNewstyleInternationalization():
 
 
 @pytest.mark.ext
-class TestAutoEscape():
+class TestAutoEscape(object):
 
     def test_scoped_setting(self):
         env = Environment(extensions=['jinja2.ext.autoescape'],
index ade253edc3a2fb5db2de87d49690178902026554..67591270b044aef2a22e5e57228a5aa2571c1fce 100644 (file)
@@ -26,7 +26,7 @@ def test_env():
 
 
 @pytest.mark.imports
-class TestImports():
+class TestImports(object):
 
     def test_context_imports(self, test_env):
         t = test_env.from_string('{% import "module" as m %}{{ m.test() }}')
@@ -74,7 +74,7 @@ class TestImports():
 
 @pytest.mark.imports
 @pytest.mark.includes
-class TestIncludes():
+class TestIncludes(object):
 
     def test_context_include(self, test_env):
         t = test_env.from_string('{% include "header" %}')
index 1cb7390441c09e3ca48ca86f31737489c91e139a..32e2c68dbac4e7b0627ede70bb21e6447020f464 100644 (file)
@@ -78,7 +78,7 @@ def env():
 
 
 @pytest.mark.inheritance
-class TestInheritance():
+class TestInheritance(object):
 
     def test_layout(self, env):
         tmpl = env.get_template('layout')
@@ -201,7 +201,7 @@ class TestInheritance():
 
 
 @pytest.mark.inheritance
-class TestBugFix():
+class TestBugFix(object):
 
     def test_fixed_macro_scoping_bug(self, env):
         assert Environment(loader=DictLoader({
index 7a49ba245d98a92f41d4862ccae5faefb87603a5..1f8f74656062100180462519d9bf8f2affaaaa78 100644 (file)
@@ -27,7 +27,7 @@ else:
 
 @pytest.mark.lexnparse
 @pytest.mark.tokenstream
-class TestTokenStream():
+class TestTokenStream(object):
     test_tokens = [Token(1, TOKEN_BLOCK_BEGIN, ''),
                    Token(2, TOKEN_BLOCK_END, ''),
                    ]
@@ -55,7 +55,7 @@ class TestTokenStream():
 
 @pytest.mark.lexnparse
 @pytest.mark.lexer
-class TestLexer():
+class TestLexer(object):
 
     def test_raw1(self, env):
         tmpl = env.from_string(
@@ -129,7 +129,7 @@ class TestLexer():
 
 @pytest.mark.lexnparse
 @pytest.mark.parser
-class TestParser():
+class TestParser(object):
 
     def test_php_syntax(self, env):
         env = Environment('<?', '?>', '<?=', '?>', '<!--', '-->')
@@ -246,7 +246,7 @@ and bar comment #}
 
 @pytest.mark.lexnparse
 @pytest.mark.syntax
-class TestSyntax():
+class TestSyntax(object):
 
     def test_call(self, env):
         env = Environment()
@@ -442,7 +442,7 @@ class TestSyntax():
 
 @pytest.mark.lexnparse
 @pytest.mark.lstripblocks
-class TestLstripBlocks():
+class TestLstripBlocks(object):
 
     def test_lstrip(self, env):
         env = Environment(lstrip_blocks=True, trim_blocks=False)
index b916b911b9dda968d25a7e9919cb6b0421f64c5d..f4ac2558249a339a6315809c3231f65bdfc1e721 100644 (file)
@@ -22,7 +22,7 @@ from jinja2.exceptions import TemplateNotFound
 
 
 @pytest.mark.loaders
-class TestLoaders():
+class TestLoaders(object):
 
     def test_dict_loader(self, dict_loader):
         env = Environment(loader=dict_loader)
@@ -121,7 +121,7 @@ class TestLoaders():
 
 @pytest.mark.loaders
 @pytest.mark.moduleloader
-class TestModuleLoader():
+class TestModuleLoader(object):
     archive = None
 
     def compile_down(self, prefix_loader, zip='deflated', py_compile=False):
index 644b15f5fbedf5a869865270d80a22f0626b6999..adc651e9b9fe8dd56914a274affdfb44eaa1a38f 100644 (file)
@@ -17,7 +17,7 @@ from jinja2._compat import text_type
 
 
 @pytest.mark.regression
-class TestCorner():
+class TestCorner(object):
 
     def test_assigned_scoping(self, env):
         t = env.from_string('''
@@ -78,7 +78,7 @@ class TestCorner():
 
 
 @pytest.mark.regression
-class TestBug():
+class TestBug(object):
 
     def test_keyword_folding(self, env):
         env = Environment()
index f0edd881be3bfea52cad1261e56dde1aa1378efd..33d204c8e747a21a26011ab85f04c9a413f6601a 100644 (file)
@@ -42,7 +42,7 @@ class PublicStuff(object):
 
 
 @pytest.mark.sandbox
-class TestSandbox():
+class TestSandbox(object):
 
     def test_unsafe(self, env):
         env = SandboxedEnvironment()
index 54d87bb4213f1d5dcaf77ec9a7abf42bf82d9480..a606f1ec3ef331bbf977d48a290eb2b358b44b83 100644 (file)
@@ -14,7 +14,7 @@ from jinja2 import Markup, Environment
 
 
 @pytest.mark.test_tests
-class TestTestsCase():
+class TestTestsCase(object):
 
     def test_defined(self, env):
         tmpl = env.from_string('{{ missing is defined }}|'
index 95cf0435014b744ef7c43fd99c6563c850bada7e..0775a960f6302a7b92fa448a9da0952523b401fa 100644 (file)
@@ -19,7 +19,7 @@ from jinja2.utils import LRUCache, escape, object_type_repr, urlize
 
 @pytest.mark.utils
 @pytest.mark.lrucache
-class TestLRUCache():
+class TestLRUCache(object):
 
     def test_simple(self):
         d = LRUCache(3)
@@ -46,7 +46,7 @@ class TestLRUCache():
 
 @pytest.mark.utils
 @pytest.mark.helpers
-class TestHelpers():
+class TestHelpers(object):
 
     def test_object_type_repr(self):
         class X(object):
@@ -62,7 +62,7 @@ class TestHelpers():
 @pytest.mark.markupleak
 @pytest.mark.skipif(hasattr(escape, 'func_code'),
                     reason='this test only tests the c extension')
-class TestMarkupLeak():
+class TestMarkupLeak(object):
 
     def test_markup_leaks(self):
         counts = set()
@@ -78,7 +78,7 @@ class TestMarkupLeak():
 
 @pytest.mark.utils
 @pytest.mark.escapeUrlizeTarget
-class TestEscapeUrlizeTarget():
+class TestEscapeUrlizeTarget(object):
     def test_escape_urlize_target(self):
         url = "http://example.org"
         target = "<script>"