Skip to content

Commit f970118

Browse files
committed
fix tests
1 parent dad41ad commit f970118

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_profiling/test_sampling_profiler/test_live_collector_ui.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,9 @@ def test_run_failed_module_live(self):
857857
mock.patch('sys.stderr', new=io.StringIO()) as fake_stderr
858858
):
859859
main()
860-
self.assertStartsWith(
861-
fake_stderr.getvalue(),
862-
'\x1b[31mtest test_asdasd crashed -- Traceback (most recent call last):'
860+
self.assertIn(
861+
'test test_asdasd crashed -- Traceback (most recent call last):',
862+
fake_stderr.getvalue()
863863
)
864864

865865
def test_run_failed_script_live(self):
@@ -888,7 +888,7 @@ def test_run_failed_script_live(self):
888888
)
889889
self.assertEndsWith(
890890
stderr,
891-
'ZeroDivisionError\x1b[0m: \x1b[35mdivision by zero\x1b[0m\n\n'
891+
'ZeroDivisionError: division by zero\n\n'
892892
)
893893

894894

0 commit comments

Comments
 (0)