summaryrefslogtreecommitdiff
path: root/pkg_resources/tests/test_resources.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources/tests/test_resources.py')
-rw-r--r--pkg_resources/tests/test_resources.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index 6cc3de0b..82a987b7 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -593,10 +593,8 @@ class TestNamespaces:
pkg2_init.close()
import pkg1
assert "pkg1" in pkg_resources._namespace_packages
- try:
- import pkg1.pkg2
- except ImportError:
- self.fail("Setuptools tried to import the parent namespace package")
+ # attempt to import pkg2 from site-pkgs2
+ import pkg1.pkg2
# check the _namespace_packages dict
assert "pkg1.pkg2" in pkg_resources._namespace_packages
assert pkg_resources._namespace_packages["pkg1"] == ["pkg1.pkg2"]