[issue42906] python3 -m doctest test.py tests the stdlib "time" module instead

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Whoops, I meant export PYTHONPATH=. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue42906] python3 -m doctest test.py tests the stdlib "time" module instead

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, this is not a bug. The builtin time module takes precedence in this case because the current directory is not put at the front of the module search path (sys.path). As a workaround you could exportPYTHONPATH=. -- nosy: +gvanrossum resolutio

[issue42906] python3 -m doctest test.py tests the stdlib "time" module instead

2021-01-12 Thread Stijn van Drongelen
Stijn van Drongelen added the comment: Reproducible in Python 3.8.7 and 3.9.1. -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___

[issue42906] python3 -m doctest test.py tests the stdlib "time" module instead

2021-01-12 Thread Stijn van Drongelen
New submission from Stijn van Drongelen : I have two files, named time.py and time_.py, with the same contents: def foo(): """Returns 1. >>> foo() 1 """ return 1 When I run python3 -m doctest -v time_.py I see the expected behaviour: Tryi