Skip to content

Commit 18af38e

Browse files
committed
missed a few direct comparison for stdout
1 parent 04d2320 commit 18af38e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/test_instrument_all_and_run.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,12 @@ def test_sort():
207207
pytest_max_loops=1,
208208
testing_time=0.1,
209209
)
210-
assert "codeflash stdout: Sorting list" in results2[0].stdout
211-
assert "result: [0, 1, 2, 3, 4, 5]" in results2[0].stdout
210+
out_str = """codeflash stdout: Sorting list
211+
result: [0, 1, 2, 3, 4, 5]
212+
213+
codeflash stdout: Sorting list
214+
result: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0]"""
215+
assert out_str == results2[0].stdout.strip()
212216
assert compare_test_results(test_results, results2)
213217
finally:
214218
fto_path.write_text(original_code, "utf-8")
@@ -376,7 +380,12 @@ def test_sort():
376380
assert test_results[1].runtime > 0
377381
assert test_results[1].did_pass
378382
assert test_results[1].return_value == ([0, 1, 2, 3, 4, 5],)
379-
assert "codeflash stdout : BubbleSorter.sorter() called" in test_results[1].stdout
383+
out_str = """
384+
codeflash stdout : BubbleSorter.sorter() called
385+
386+
387+
codeflash stdout : BubbleSorter.sorter() called"""
388+
assert test_results[1].stdout.strip() == out_str.strip()
380389
assert compare_test_results(test_results, test_results)
381390
assert test_results[2].id.function_getting_tested == "BubbleSorter.__init__"
382391
assert test_results[2].id.test_function_name == "test_sort"

0 commit comments

Comments
 (0)