[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly
Karthikeyan Singaravelan
report at bugs.python.org
Mon Jul 23 09:04:07 EDT 2018
Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:
Almost always fails 8/10 times.
cpython git:(master) $ ./python -m unittest -v test.test_pkg
test_1 (test.test_pkg.TestPkg) ... ok
test_2 (test.test_pkg.TestPkg) ... ok
test_3 (test.test_pkg.TestPkg) ... ok
test_4 (test.test_pkg.TestPkg) ... ERROR
test_5 (test.test_pkg.TestPkg) ... ok
test_6 (test.test_pkg.TestPkg) ... ok
test_7 (test.test_pkg.TestPkg) ... FAIL
test_8 (test.test_pkg.TestPkg) ... ok
======================================================================
ERROR: test_4 (test.test_pkg.TestPkg)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/cpython/Lib/test/test_pkg.py", line 180, in test_4
self.run_code(s)
File "/home/cpython/Lib/test/test_pkg.py", line 69, in run_code
exec(textwrap.dedent(code), globals(), {"self": self})
File "<string>", line 2, in <module>
File "/tmp/tmpfxqne6o1/t4.py", line 1, in <module>
RuntimeError: Shouldnt load t4.py
======================================================================
FAIL: test_7 (test.test_pkg.TestPkg)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/cpython/Lib/test/test_pkg.py", line 260, in test_7
'__name__', '__package__', '__path__', '__spec__'])
AssertionError: Lists differ: ['__c[34 chars]__loader__', '__name__', '__package__', '__spec__'] != ['__c[34 chars]__loader__', '__name__', '__package__', '__path__', '__spec__']
First differing element 6:
'__spec__'
'__path__'
Second list contains 1 additional elements.
First extra element 7:
'__spec__'
['__cached__',
'__doc__',
'__file__',
'__loader__',
'__name__',
'__package__',
+ '__path__',
'__spec__']
----------------------------------------------------------------------
Ran 8 tests in 0.040s
FAILED (failures=1, errors=1)
----------
nosy: +xtreak
versions: -Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34200>
_______________________________________
More information about the Python-bugs-list
mailing list