This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vajrasky
Recipients vajrasky
Date 2018-12-17.11:35:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za>
In-reply-to
Content
$ git clone git@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.
History
Date User Action Args
2018-12-17 11:35:16vajraskysetrecipients: + vajrasky
2018-12-17 11:35:16vajraskysetmessageid: <1545046516.28.0.788709270274.issue35519@psf.upfronthosting.co.za>
2018-12-17 11:35:16vajraskylinkissue35519 messages
2018-12-17 11:35:15vajraskycreate