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

Skip to content

Commit 7f554c5

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

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