[issue31676] Strange failure in test_cgitb

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: The problem is that imp.load_source() modifies __file__ of the __main__ module. Example of a file x.py: --- import imp import sys print(sys.modules[__name__]) try: imp.load_source(__name__, __file__ + "\0") except: pass print(sys.modules[__name__]) ---

[issue31676] Strange failure in test_cgitb

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: Sorry, run: ./python -m test -M4G test_imp test_cgitb --matchfile=tests -- ___ Python tracker ___ ___

[issue31676] Strange failure in test_cgitb

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: I bisect the bug manually and using test.bisect. I identified that the bug is triggered when you run the following 3 tests: --- test.test_imp.ImportTests.test_load_source test.test_cgitb.TestCgitb.test_html test.test_cgitb.TestCgitb.test_fonts --- Write these

[issue31676] Strange failure in test_cgitb

2017-10-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : Added file: https://bugs.python.org/file47185/tests-bigmem.txt ___ Python tracker ___ ___ Python-bugs-list maili

[issue31676] Strange failure in test_cgitb

2017-10-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I have found a strange failure when run the bigmem tests. 0:20:19 load avg: 1.04 [116/407/1] test_cgitb test test_cgitb failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_cgitb.py", line 23, in test_html raise Val