aboutsummaryrefslogtreecommitdiff
path: root/tests/transforms_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-04-12 23:20:56 +0100
committerMichael Williamson <mike@zwobble.org>2017-04-12 23:20:56 +0100
commitf2db4aee1fe7007f410ef6cf51b0fdd5a1b1f49c (patch)
tree1b3bb9cb3d3958e62f08384e81a2e8619a34c594 /tests/transforms_tests.py
parentd1dd5242d3139b964f7a5485afd5a8ed672c4600 (diff)
Add transform for runs
Diffstat (limited to 'tests/transforms_tests.py')
-rw-r--r--tests/transforms_tests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/transforms_tests.py b/tests/transforms_tests.py
index 2c1678f..d0604f8 100644
--- a/tests/transforms_tests.py
+++ b/tests/transforms_tests.py
@@ -21,6 +21,21 @@ class ParagraphTests(object):
@istest
+class RunTests(object):
+ @istest
+ def run_is_transformed(self):
+ run = documents.run(children=[])
+ result = transforms.run(lambda _: documents.tab())(run)
+ assert_equal(documents.tab(), result)
+
+ @istest
+ def non_paragraph_elements_are_not_transformed(self):
+ paragraph = documents.paragraph(children=[])
+ result = transforms.run(lambda _: documents.tab())(paragraph)
+ assert_equal(documents.paragraph(children=[]), result)
+
+
+@istest
class EachElementTests(object):
@istest
def all_descendants_are_transformed(self):