@pytest.mark.api
@pytest.mark.extended
-class TestExtendedAPI():
+class TestExtendedAPI(object):
def test_item_and_attribute(self, env):
from jinja2.sandbox import SandboxedEnvironment
@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 }}')
@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 "
@pytest.mark.api
@pytest.mark.undefined
-class TestUndefined():
+class TestUndefined(object):
def test_stopiteration_is_undefined(self):
def test():
@pytest.mark.api
@pytest.mark.lowlevel
-class TestLowLevel():
+class TestLowLevel(object):
def test_custom_code_generator(self):
class CustomCodeGenerator(CodeGenerator):
@pytest.mark.byte_code_cache
-class TestByteCodeCache():
+class TestByteCodeCache(object):
def test_simple(self, env):
tmpl = env.get_template('test.html')
@pytest.mark.ext
-class TestExtensions():
+class TestExtensions(object):
def test_extend_late(self):
env = Environment()
@pytest.mark.ext
-class TestInternationalization():
+class TestInternationalization(object):
def test_trans(self):
tmpl = i18n_env.get_template('child.html')
@pytest.mark.ext
-class TestNewstyleInternationalization():
+class TestNewstyleInternationalization(object):
def test_trans(self):
tmpl = newstyle_i18n_env.get_template('child.html')
@pytest.mark.ext
-class TestAutoEscape():
+class TestAutoEscape(object):
def test_scoped_setting(self):
env = Environment(extensions=['jinja2.ext.autoescape'],
@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() }}')
@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" %}')
@pytest.mark.inheritance
-class TestInheritance():
+class TestInheritance(object):
def test_layout(self, env):
tmpl = env.get_template('layout')
@pytest.mark.inheritance
-class TestBugFix():
+class TestBugFix(object):
def test_fixed_macro_scoping_bug(self, env):
assert Environment(loader=DictLoader({
@pytest.mark.lexnparse
@pytest.mark.tokenstream
-class TestTokenStream():
+class TestTokenStream(object):
test_tokens = [Token(1, TOKEN_BLOCK_BEGIN, ''),
Token(2, TOKEN_BLOCK_END, ''),
]
@pytest.mark.lexnparse
@pytest.mark.lexer
-class TestLexer():
+class TestLexer(object):
def test_raw1(self, env):
tmpl = env.from_string(
@pytest.mark.lexnparse
@pytest.mark.parser
-class TestParser():
+class TestParser(object):
def test_php_syntax(self, env):
env = Environment('<?', '?>', '<?=', '?>', '<!--', '-->')
@pytest.mark.lexnparse
@pytest.mark.syntax
-class TestSyntax():
+class TestSyntax(object):
def test_call(self, env):
env = Environment()
@pytest.mark.lexnparse
@pytest.mark.lstripblocks
-class TestLstripBlocks():
+class TestLstripBlocks(object):
def test_lstrip(self, env):
env = Environment(lstrip_blocks=True, trim_blocks=False)
@pytest.mark.loaders
-class TestLoaders():
+class TestLoaders(object):
def test_dict_loader(self, dict_loader):
env = Environment(loader=dict_loader)
@pytest.mark.loaders
@pytest.mark.moduleloader
-class TestModuleLoader():
+class TestModuleLoader(object):
archive = None
def compile_down(self, prefix_loader, zip='deflated', py_compile=False):
@pytest.mark.regression
-class TestCorner():
+class TestCorner(object):
def test_assigned_scoping(self, env):
t = env.from_string('''
@pytest.mark.regression
-class TestBug():
+class TestBug(object):
def test_keyword_folding(self, env):
env = Environment()
@pytest.mark.sandbox
-class TestSandbox():
+class TestSandbox(object):
def test_unsafe(self, env):
env = SandboxedEnvironment()
@pytest.mark.test_tests
-class TestTestsCase():
+class TestTestsCase(object):
def test_defined(self, env):
tmpl = env.from_string('{{ missing is defined }}|'
@pytest.mark.utils
@pytest.mark.lrucache
-class TestLRUCache():
+class TestLRUCache(object):
def test_simple(self):
d = LRUCache(3)
@pytest.mark.utils
@pytest.mark.helpers
-class TestHelpers():
+class TestHelpers(object):
def test_object_type_repr(self):
class X(object):
@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()
@pytest.mark.utils
@pytest.mark.escapeUrlizeTarget
-class TestEscapeUrlizeTarget():
+class TestEscapeUrlizeTarget(object):
def test_escape_urlize_target(self):
url = "http://example.org"
target = "<script>"