8000 bpo-32872: Avoid regrtest compatibility issue with namespace packages… · python/cpython@e52ac04 · GitHub
[go: up one dir, main page]

Skip to content

Commit e52ac04

Browse files
authored
bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)
1 parent 65a3470 commit e52ac04

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/test/libregrtest/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def setup_tests(ns):
5757
if hasattr(module, '__path__'):
5858
for index, path in enumerate(module.__path__):
5959
module.__path__[index] = os.path.abspath(path)
60-
if hasattr(module, '__file__'):
60+
if getattr(module, '__file__', None):
6161
module.__file__ = os.path.abspath(module.__file__)
6262

6363
# MacOSX (a.k.a. Darwin) has a default stack size that is too small
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid regrtest compatibility issue with namespace packages.

0 commit comments

Comments
 (0)
0