diff options
author | Michael Bourke <michael@iter8ve.com> | 2022-01-09 16:38:12 +1100 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-01-14 09:57:14 -0500 |
commit | 7e52b60b7dac75a3c7177e69244123c0dad9e9d9 (patch) | |
tree | 2df96da5716169b2351f442c272a39ed6940332f /test/test_loop.py | |
parent | 3c3196754b55b48c044e59a5beacb9a13bc25114 (diff) | |
download | mako-7e52b60b7dac75a3c7177e69244123c0dad9e9d9.tar.gz |
Refactor test.util into mako.testing
Fixes: #349
Change-Id: I202c252a913fb72cc328a6e7f0f33174802487d3
Diffstat (limited to 'test/test_loop.py')
-rw-r--r-- | test/test_loop.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/test_loop.py b/test/test_loop.py index be7d440..19d40b5 100644 --- a/test/test_loop.py +++ b/test/test_loop.py @@ -1,5 +1,4 @@ import re -import unittest from mako import exceptions from mako.codegen import _FOR_LOOP @@ -7,12 +6,12 @@ from mako.lookup import TemplateLookup from mako.runtime import LoopContext from mako.runtime import LoopStack from mako.template import Template -from .util.assertions import assert_raises_message -from .util.fixtures import TemplateTest -from .util.helpers import flatten_result +from mako.testing.assertions import assert_raises_message +from mako.testing.fixtures import TemplateTest +from mako.testing.helpers import flatten_result -class TestLoop(unittest.TestCase): +class TestLoop: def test__FOR_LOOP(self): for statement, target_list, expression_list in ( ("for x in y:", "x", "y"), @@ -137,7 +136,7 @@ ${x} ${loop.index} <- outer loop ) -class TestLoopStack(unittest.TestCase): +class TestLoopStack: def setUp(self): self.stack = LoopStack() self.bottom = "spam" @@ -180,7 +179,7 @@ class TestLoopStack(unittest.TestCase): assert before == (after + 1), "Exiting a context pops the stack" -class TestLoopContext(unittest.TestCase): +class TestLoopContext: def setUp(self): self.iterable = [1, 2, 3] self.ctx = LoopContext(self.iterable) |