Commit 7003458a authored by Jason R. Coombs's avatar Jason R. Coombs

More simple asserts

parent 4cd8b93b
......@@ -605,8 +605,10 @@ class NamespaceTests(TestCase):
self.fail("Setuptools tried to import the parent namespace package")
# check the _namespace_packages dict
assert "pkg1.pkg2" in pkg_resources._namespace_packages
self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"])
assert pkg_resources._namespace_packages["pkg1"] == ["pkg1.pkg2"]
# check the __path__ attribute contains both paths
self.assertEqual(pkg1.pkg2.__path__, [
expected = [
os.path.join(self._tmpdir, "site-pkgs", "pkg1", "pkg2"),
os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2")])
os.path.join(self._tmpdir, "site-pkgs2", "pkg1", "pkg2"),
]
assert pkg1.pkg2.__path__ == expected
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment