File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,9 @@ def try_multiprocessing_code(
489489 """ ,
490490 )
491491
492+ # Dev mode turns on deprecation warnings that some concurrency
493+ # libraries issue. We don't need to see those.
494+ self .del_environ ("PYTHONDEVMODE" )
492495 cmd = f"coverage run { args } multi.py { start_method } "
493496 _ , out = self .run_command_status (cmd )
494497 expected_cant_trace = cant_trace_msg (concurrency , the_module )
Original file line number Diff line number Diff line change @@ -880,16 +880,17 @@ def test_report_with_chdir(self) -> None:
880880 print("Line One")
881881 os.chdir("subdir")
882882 print("Line Two")
883- print(open("something", encoding="utf-8").read())
883+ with open("something", encoding="utf-8") as f:
884+ print(f.read())
884885 """ ,
885886 )
886887 self .make_file ("subdir/something" , "hello" )
887888 out = self .run_command ("coverage run --source=. chdir.py" )
888889 assert out == "Line One\n Line Two\n hello\n "
889890 report = self .report_from_command ("coverage report" )
890- assert self .last_line_squeezed (report ) == "TOTAL 5 0 100%"
891+ assert self .last_line_squeezed (report ) == "TOTAL 6 0 100%"
891892 report = self .report_from_command ("coverage report --format=markdown" )
892- assert self .last_line_squeezed (report ) == "| **TOTAL** | **5 ** | **0** | **100%** |"
893+ assert self .last_line_squeezed (report ) == "| **TOTAL** | **6 ** | **0** | **100%** |"
893894
894895 def test_bug_156_file_not_run_should_be_zero (self ) -> None :
895896 # https://github.com/coveragepy/coveragepy/issues/156
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ setenv =
3131 pypy3{,10,11}: COVERAGE_TEST_CORES =pytrace
3232 PYTHONWARNDEFAULTENCODING =1
3333 PYTHONWARNINGS =ignore::EncodingWarning:pip._internal.utils.subprocess,ignore::EncodingWarning:pip._internal.configuration
34- # Disable CPython's color output
34+ # Try to be strict during testing. https://docs.python.org/3/library/devmode.html
35+ PYTHONDEVMODE =1
36+ # Disable CPython's color output.
3537 PYTHON_COLORS =0
3638
3739# $set_env.py: COVERAGE_PIP_ARGS - Extra arguments for `pip install`
You can’t perform that action at this time.
0 commit comments