From: Armin Ronacher Date: Mon, 2 Jan 2017 20:14:51 +0000 (+0100) Subject: Fixed some broken tests X-Git-Tag: 2.9~30^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ab5ed50d4eb24825a94b1c551cb74bbf6f7185a;p=thirdparty%2Fjinja.git Fixed some broken tests --- diff --git a/tests/test_ext.py b/tests/test_ext.py index f49c09c9..a870d5b5 100644 --- a/tests/test_ext.py +++ b/tests/test_ext.py @@ -368,7 +368,7 @@ class TestNewstyleInternationalization(): # that the generated code does not pass num twice (although that # would work) for better performance. This only works on the # newstyle gettext of course - assert re.search(r"l_ngettext, u?'\%\(num\)s apple', u?'\%\(num\)s " + assert re.search(r"u?'\%\(num\)s apple', u?'\%\(num\)s " r"apples', 3", source) is not None def test_trans_vars(self): diff --git a/tests/test_idtracking.py b/tests/test_idtracking.py index 758b4a80..53798991 100644 --- a/tests/test_idtracking.py +++ b/tests/test_idtracking.py @@ -33,7 +33,7 @@ def test_basics(): 'foo': 'l_1_foo', } assert sym.loads == { - 'l_1_foo': ('undefined', None), + 'l_1_foo': ('param', None), } @@ -145,7 +145,7 @@ def test_complex(): 'item': 'l_1_item', } assert for_sym.loads == { - 'l_1_item': ('undefined', None), + 'l_1_item': ('param', None), } assert for_sym.stores == set(['item']) assert for_sym.dump_stores() == { @@ -213,6 +213,6 @@ def test_if_branching_multi_scope(): assert for_sym.stores == set(['item', 'x']) assert for_sym.loads == { 'l_1_x': ('alias', 'l_0_x'), - 'l_1_item': ('undefined', None), + 'l_1_item': ('param', None), 'l_1_expression': ('resolve', 'expression'), }