mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Issue #21503: Use test_both() consistently in test_importlib.
This commit is contained in:
parent
d50cee2045
commit
3497c0bf95
30 changed files with 526 additions and 428 deletions
|
|
@ -62,20 +62,28 @@ def test_insensitive(self):
|
|||
self.assertIsNotNone(insensitive)
|
||||
self.assertIn(self.name, insensitive.get_filename(self.name))
|
||||
|
||||
|
||||
class CaseSensitivityTestPEP302(CaseSensitivityTest):
|
||||
def find(self, finder):
|
||||
return finder.find_module(self.name)
|
||||
|
||||
Frozen_CaseSensitivityTestPEP302, Source_CaseSensitivityTestPEP302 = util.test_both(
|
||||
CaseSensitivityTestPEP302, importlib=importlib, machinery=machinery)
|
||||
|
||||
(Frozen_CaseSensitivityTestPEP302,
|
||||
Source_CaseSensitivityTestPEP302
|
||||
) = util.test_both(CaseSensitivityTestPEP302, importlib=importlib,
|
||||
machinery=machinery)
|
||||
|
||||
|
||||
class CaseSensitivityTestPEP451(CaseSensitivityTest):
|
||||
def find(self, finder):
|
||||
found = finder.find_spec(self.name)
|
||||
return found.loader if found is not None else found
|
||||
|
||||
Frozen_CaseSensitivityTestPEP451, Source_CaseSensitivityTestPEP451 = util.test_both(
|
||||
CaseSensitivityTestPEP451, importlib=importlib, machinery=machinery)
|
||||
|
||||
(Frozen_CaseSensitivityTestPEP451,
|
||||
Source_CaseSensitivityTestPEP451
|
||||
) = util.test_both(CaseSensitivityTestPEP451, importlib=importlib,
|
||||
machinery=machinery)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue