New submission from Martin Panter:

Running the test suite with -Werror enabled causes test_multiprocessing_spawn 
to print out lots of unhandled errors from the garbage collector, and one of 
these causes a test failure. It looks like there are lots of files that should 
be explicitly closed rather than leaving them for the garbage collector.

Also, one error occurred _after_ the test command had exiting. That can’t be a 
good thing, though I have never used the multiprocessing module so maybe this 
is unavoidable.

$ ./python -Werror -m unittest -v test.test_multiprocessing_spawn
. . .
======================================================================
FAIL: test_sys_exit 
(test.test_multiprocessing_spawn.WithProcessesTestSubclassingProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/media/disk/home/proj/python/cpython/Lib/test/_test_multiprocessing.py", line 
483, in test_sys_exit
    self.assertEqual(f.read().rstrip(), str(reason))
AssertionError: "[1, 2, 3]\nException ignored in: <_io.Fi[136 chars]-8'>" != 
'[1, 2, 3]'
- [1, 2, 3]
?          -
+ [1, 2, 3]- Exception ignored in: <_io.FileIO name='/dev/null' mode='rb' 
closefd=True>
- ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='r' 
encoding='UTF-8'>

----------------------------------------------------------------------
Ran 265 tests in 151.904s

FAILED (failures=1, skipped=15)
[Exit 1]
$ Exception ignored in: <_io.FileIO name='/dev/null' mode='rb' closefd=True>
ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='r' 
encoding='UTF-8'>

----------
components: Tests
messages: 254834
nosy: martin.panter
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn ResourceWarning with -Werror
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25654>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to