diff options
Diffstat (limited to 'Lib/test/test_importlib/test_resource.py')
-rw-r--r-- | Lib/test/test_importlib/test_resource.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_importlib/test_resource.py b/Lib/test/test_importlib/test_resource.py index d717e1d..b076860 100644 --- a/Lib/test/test_importlib/test_resource.py +++ b/Lib/test/test_importlib/test_resource.py @@ -131,10 +131,9 @@ class ResourceFromZipsTest(util.ZipSetupBase, unittest.TestCase): class NamespaceTest(unittest.TestCase): - def test_namespaces_cant_have_resources(self): - contents = set(resources.contents( - 'test.test_importlib.data03.namespace')) - self.assertEqual(len(contents), 0) + def test_namespaces_cannot_have_resources(self): + contents = resources.contents('test.test_importlib.data03.namespace') + self.assertFalse(list(contents)) # Even though there is a file in the namespace directory, it is not # considered a resource, since namespace packages can't have them. self.assertFalse(resources.is_resource( |