aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_resources.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-07-12 08:58:33 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-07-12 08:58:33 -0400
commit4cd8b93b95ccac00f3926ffbcead754331853c6d (patch)
tree78782e9768d325351578c5427005fe1632e577c8 /setuptools/tests/test_resources.py
parentf420ad2c7d1c0cb232c9713c02fc0f5c798fc682 (diff)
downloadexternal_python_setuptools-4cd8b93b95ccac00f3926ffbcead754331853c6d.tar.gz
external_python_setuptools-4cd8b93b95ccac00f3926ffbcead754331853c6d.tar.bz2
external_python_setuptools-4cd8b93b95ccac00f3926ffbcead754331853c6d.zip
Use simple asserts. pytest handles this nicely. Removes broken _assertIn.
Diffstat (limited to 'setuptools/tests/test_resources.py')
-rw-r--r--setuptools/tests/test_resources.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index 443905cc..279fd139 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -575,13 +575,6 @@ class NamespaceTests(TestCase):
pkg_resources._namespace_packages = self._ns_pkgs.copy()
sys.path = self._prev_sys_path[:]
- def _assertIn(self, member, container):
- """ assertIn and assertTrue does not exist in Python2.3"""
- if member not in container:
- standardMsg = '%s not found in %s' % (safe_repr(member),
- safe_repr(container))
- self.fail(self._formatMessage(msg, standardMsg))
-
def test_two_levels_deep(self):
"""
Test nested namespace packages
@@ -605,13 +598,13 @@ class NamespaceTests(TestCase):
pkg2_init.write(ns_str)
pkg2_init.close()
import pkg1
- self._assertIn("pkg1", pkg_resources._namespace_packages.keys())
+ assert "pkg1" in pkg_resources._namespace_packages
try:
import pkg1.pkg2
except ImportError:
self.fail("Setuptools tried to import the parent namespace package")
# check the _namespace_packages dict
- self._assertIn("pkg1.pkg2", pkg_resources._namespace_packages.keys())
+ assert "pkg1.pkg2" in pkg_resources._namespace_packages
self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"])
# check the __path__ attribute contains both paths
self.assertEqual(pkg1.pkg2.__path__, [