From f3a90f71e04b55a4e8ceab49740df7af67a8923f Mon Sep 17 00:00:00 2001 From: Mark Joshwel Date: Sat, 2 Sep 2023 10:57:26 +0000 Subject: [PATCH] tests: fix uq alt output and pass debug=True to s+ --- test.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test.py b/test.py index 38aa439..0b9dab5 100644 --- a/test.py +++ b/test.py @@ -91,7 +91,7 @@ tests: list[ContinuityTest] = [ ), ( "The University of Queensland\n" - "Macquarie Street\n" + "Eleanor Schonell Bridge\n" "St Lucia, Greater Brisbane, Dutton Park\n" "4072\n" "Queensland, Australia" @@ -141,10 +141,7 @@ def main() -> int: test_stderr = StringIO() output: str = "" - behaviour = surplus.Behaviour( - test.query, - stderr=test_stderr, - ) + behaviour = surplus.Behaviour(test.query, stderr=test_stderr, debug=True) try: query = surplus.parse_query(behaviour) @@ -186,12 +183,14 @@ def main() -> int: for expected_output in fail.test.expected: print( - indent(text=repr(expected_output), prefix=(2 * INDENT) * " ") + "\n" + indent(text=repr(expected_output), prefix=(2 * INDENT) * " ") + + "\n" + (indent(text=expected_output, prefix=(2 * INDENT) * " ") + "\n") ) print( - indent(text="Actual:", prefix=INDENT * " ") + "\n" + indent(text="Actual:", prefix=INDENT * " ") + + "\n" + (indent(text=repr(fail.output), prefix=(2 * INDENT) * " ") + "\n") + (indent(text=fail.output, prefix=(2 * INDENT) * " ") + "\n\n") + (indent(text="stderr:", prefix=INDENT * " ") + "\n")