From 5a6563868b6db1492d398a96df692f32dc8705ab Mon Sep 17 00:00:00 2001 From: Ben Leith Date: Mon, 19 Feb 2024 09:15:35 +1100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Bruno Oliveira --- testing/logging/test_reporting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/logging/test_reporting.py b/testing/logging/test_reporting.py index 4a4f72703..7e592febf 100644 --- a/testing/logging/test_reporting.py +++ b/testing/logging/test_reporting.py @@ -840,8 +840,7 @@ def test_log_file_mode_ini(pytester: Pytester) -> None: # fnmatch_lines does an assertion internally result.stdout.fnmatch_lines(["test_log_file_mode_ini.py PASSED"]) - # make sure that we get a '0' exit code for the testsuite - assert result.ret == 0 + assert result.ret == ExitCode.OK assert os.path.isfile(log_file) with open(log_file, encoding="utf-8") as rfh: contents = rfh.read() @@ -1215,7 +1214,8 @@ def test_log_set_path_with_log_file_mode(pytester: Pytester) -> None: with open(test_second_log_file, mode="w", encoding="utf-8") as wfh: wfh.write("A custom header for test 2\n") - pytester.runpytest() + result = pytester.runpytest() + assert result.ret == ExitCode.OK with open(test_first_log_file, encoding="utf-8") as rfh: content = rfh.read()