STINNER Victor <vstin...@redhat.com> added the comment:
The test creates the following files: /tmp/tmpsobc8gzf/t7.py /tmp/tmpsobc8gzf/t7 /tmp/tmpsobc8gzf/t7/__init__.py /tmp/tmpsobc8gzf/t7/sub.py /tmp/tmpsobc8gzf/t7/sub /tmp/tmpsobc8gzf/t7/sub/__init__.py /tmp/tmpsobc8gzf/t7/sub/.py /tmp/tmpsobc8gzf/t7/sub/subsub /tmp/tmpsobc8gzf/t7/sub/subsub/__init__.py /tmp/tmpsobc8gzf contains t7.py file and t7/ subdirectory. The test pass when the directory is loaded: vstinner@apu$ ./python -m test test_pkg -m test_7 Run tests sequentially 0:00:00 load avg: 0.96 [1/1] test_pkg MODULE <module 't7' from '/tmp/tmp4f6zuep7/t7/__init__.py'> == Tests result: SUCCESS == 1 test OK. Total duration: 51 ms Tests result: SUCCESS But fail when it gets the t7.py file: vstinner@apu$ ./python -m test test_pkg -m test_7 Run tests sequentially 0:00:00 load avg: 0.96 [1/1] test_pkg MODULE <module 't7' from '/tmp/tmpqzs7ftzl/t7.py'> test test_pkg failed -- Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/test/test_pkg.py", line 261, 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__'] test_pkg failed == Tests result: FAILURE == 1 test failed: test_pkg Total duration: 49 ms Tests result: FAILURE ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34200> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com