summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2020-04-18 18:48:30 +0100
committerMichael Williamson <mike@zwobble.org>2020-04-18 18:48:30 +0100
commit764c8333faf3c630cbff5e562bf8c22a1676265e (patch)
tree67f781dabbd9e2805a0561d50271e615f3b8dfbb /tests
parent3a0af29c615555c584214bffa1fd995d851d00ee (diff)
Add __repr__ to program
Diffstat (limited to 'tests')
-rw-r--r--tests/jq_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/jq_tests.py b/tests/jq_tests.py
index b6c3c38..7b82794 100644
--- a/tests/jq_tests.py
+++ b/tests/jq_tests.py
@@ -182,3 +182,10 @@ def unicode_strings_can_be_used_as_programs():
"Dragon‽",
jq.compile('.+"‽"').input(text='"Dragon"').first()
)
+
+
+@istest
+def repr_of_compile_result_is_compilation_string():
+ program = jq.compile(".")
+ repr_string = repr(program)
+ assert_equal("jq.compile({!r})".format("."), repr_string)