diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-03-28 06:43:51 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2018-03-28 07:33:49 (GMT) |
commit | 7f554c536cfe2e66a1ff0a36c8896040be1e5aee (patch) | |
tree | 96a10667834d8d3e9757e53bc7753db97c4c0788 | |
parent | 3647f85675632cb58385e4cf681ff9d30c5f881d (diff) | |
download | cpython-7f554c536cfe2e66a1ff0a36c8896040be1e5aee.zip cpython-7f554c536cfe2e66a1ff0a36c8896040be1e5aee.tar.gz cpython-7f554c536cfe2e66a1ff0a36c8896040be1e5aee.tar.bz2 |
bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276) (GH-6278)
(cherry picked from commit e52ac045972a4f75d7f52e4ee0d6de128259134d)
Co-authored-by: Ned Deily <nad@python.org>
-rw-r--r-- | Lib/test/libregrtest/setup.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2018-03-28-01-35-02.bpo-32872.J5NDUj.rst | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/setup.py b/Lib/test/libregrtest/setup.py index bf899a9..910aca1 100644 --- a/Lib/test/libregrtest/setup.py +++ b/Lib/test/libregrtest/setup.py @@ -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 diff --git a/Misc/NEWS.d/next/Tests/2018-03-28-01-35-02.bpo-32872.J5NDUj.rst b/Misc/NEWS.d/next/Tests/2018-03-28-01-35-02.bpo-32872.J5NDUj.rst new file mode 100644 index 0000000..06d656b --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2018-03-28-01-35-02.bpo-32872.J5NDUj.rst @@ -0,0 +1 @@ +Avoid regrtest compatibility issue with namespace packages. |