New submission from Vajrasky Kok <sky....@speaklikeaking.com>:
$ git clone g...@github.com:python/cpython.git cpython2 $ cd cpython2 $ ./configure --with-pydebug $ make -j $ ./python Lib/test/test_xmlrpc.py Traceback (most recent call last): File "Lib/test/test_xmlrpc.py", line 8, in <module> import xmlrpc.client as xmlrpclib File "/opt/Code/python/cpython2/Lib/xmlrpc/client.py", line 136, in <module> import http.client File "/opt/Code/python/cpython2/Lib/http/client.py", line 71, in <module> import email.parser File "/opt/Code/python/cpython2/Lib/email/parser.py", line 12, in <module> from email.feedparser import FeedParser, BytesFeedParser File "/opt/Code/python/cpython2/Lib/email/feedparser.py", line 27, in <module> from email._policybase import compat32 File "/opt/Code/python/cpython2/Lib/email/_policybase.py", line 9, in <module> from email.utils import _has_surrogates File "/opt/Code/python/cpython2/Lib/email/utils.py", line 28, in <module> import random File "/opt/Code/python/cpython2/Lib/random.py", line 47, in <module> import bisect as _bisect File "/opt/Code/python/cpython2/Lib/test/bisect.py", line 27, in <module> import tempfile File "/opt/Code/python/cpython2/Lib/tempfile.py", line 45, in <module> from random import Random as _Random ImportError: cannot import name 'Random' from 'random' (/opt/Code/python/cpython2/Lib/random.py) I know about running test this way: $ ./python -m test -v test_xmlrpc And it works. I am just wondering whether I should be able to run test this way: ./python Lib/test/test_blabla.py? Because running other tests without test module works, for example: ./python Lib/test/test_ast.py. Only test which imports random module fails. ---------- components: Tests messages: 331992 nosy: vajrasky priority: normal severity: normal status: open title: Can not run test without test module for tests which import random module versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35519> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com