bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)

This commit is contained in:
Ned Deily 2018-03-28 01:57:13 -04:00 committed by GitHub
parent 65a34709f6
commit e52ac04597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,7 @@ def setup_tests(ns):
if hasattr(module, '__path__'):
for index, path in enumerate(module.__path__):
module.__path__[index] = os.path.abspath(path)
if hasattr(module, '__file__'):
if getattr(module, '__file__', None):
module.__file__ = os.path.abspath(module.__file__)
# MacOSX (a.k.a. Darwin) has a default stack size that is too small

View File

@ -0,0 +1 @@
Avoid regrtest compatibility issue with namespace packages.