dfa7677e2f
This verifies the behavior: - Exact matches of built-ins bypass filesystem. - u-prefix modules can be overridden from the filesystem. - Builtin import can be forced using either u-prefix or sys.path=[]. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
15 lines
225 B
Python
15 lines
225 B
Python
print("time from filesystem")
|
|
|
|
# Tests the CPython-compatible / non-u-prefix way of forcing a builtin
|
|
# import.
|
|
import sys
|
|
|
|
_path = sys.path[:]
|
|
sys.path.clear()
|
|
from time import *
|
|
|
|
sys.path.extend(_path)
|
|
del _path
|
|
|
|
extra = 1
|