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

Skip to content

Commit a93662c

Browse files
bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276) (GH-6278)
(cherry picked from commit e52ac04) Co-authored-by: Ned Deily <nad@python.org>
1 parent c8698cf commit a93662c

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