mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Issue #16803: Move test_importlib.test_util to use both frozen and
source code.
This commit is contained in:
parent
6a57dd8635
commit
1340049f65
2 changed files with 96 additions and 50 deletions
|
|
@ -15,6 +15,17 @@ def import_importlib(module_name):
|
|||
return frozen, source
|
||||
|
||||
|
||||
def test_both(test_class, **kwargs):
|
||||
frozen_tests = types.new_class('Frozen_'+test_class.__name__,
|
||||
(test_class, unittest.TestCase))
|
||||
source_tests = types.new_class('Source_'+test_class.__name__,
|
||||
(test_class, unittest.TestCase))
|
||||
for attr, (frozen_value, source_value) in kwargs.items():
|
||||
setattr(frozen_tests, attr, frozen_value)
|
||||
setattr(source_tests, attr, source_value)
|
||||
return frozen_tests, source_tests
|
||||
|
||||
|
||||
CASE_INSENSITIVE_FS = True
|
||||
# Windows is the only OS that is *always* case-insensitive
|
||||
# (OS X *can* be case-sensitive).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue