Skip to content

Commit

Permalink
Workaround: use a different test module name in test_module_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Mar 5, 2024
1 parent a1106b7 commit db45852
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/test_importlib/resources/test_files.py
Expand Up @@ -79,14 +79,14 @@ def test_module_resources(self):
A module can have resources found adjacent to the module.
"""
spec = {
'mod.py': '',
'mod_res.py': '',
'res.txt': 'resources are the best',
}
_path.build(spec, self.site_dir)
import mod
import mod_res

actual = resources.files(mod).joinpath('res.txt').read_text(encoding='utf-8')
assert actual == spec['res.txt']
actual = resources.files(mod_res).joinpath('res.txt').read_text(encoding='utf-8')
self.assertEqual(actual, spec['res.txt'])


class ImplicitContextFilesTests(SiteDir, unittest.TestCase):
Expand Down

0 comments on commit db45852

Please sign in to comment.