forked from Rust-related/RustPython
mark success/fail tests for test_import
This commit is contained in:
14
Lib/test/test_importlib/frozen/test_finder.py
vendored
14
Lib/test/test_importlib/frozen/test_finder.py
vendored
@@ -70,18 +70,16 @@ class FindSpecTests(abc.FinderTests):
|
||||
expected = [os.path.dirname(filename)]
|
||||
self.assertListEqual(spec.submodule_search_locations, expected)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_package(self):
|
||||
spec = self.find('__phello__')
|
||||
self.assertIsNotNone(spec)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_module_in_package(self):
|
||||
spec = self.find('__phello__.spam', ['__phello__'])
|
||||
self.assertIsNotNone(spec)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_module(self):
|
||||
modules = [
|
||||
'__hello__',
|
||||
@@ -124,6 +122,8 @@ class FindSpecTests(abc.FinderTests):
|
||||
self.check_basic(spec, name)
|
||||
self.check_loader_state(spec, origname, filename)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_package(self):
|
||||
packages = [
|
||||
'__phello__',
|
||||
@@ -178,6 +178,8 @@ class FindSpecTests(abc.FinderTests):
|
||||
spec = self.find('<not real>')
|
||||
self.assertIsNone(spec)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_not_using_frozen(self):
|
||||
finder = self.machinery.FrozenImporter
|
||||
with import_helper.frozen_modules(enabled=False):
|
||||
@@ -210,14 +212,10 @@ class FinderTests(abc.FinderTests):
|
||||
loader = self.find(name)
|
||||
self.assertTrue(hasattr(loader, 'load_module'))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_package(self):
|
||||
loader = self.find('__phello__')
|
||||
self.assertTrue(hasattr(loader, 'load_module'))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_module_in_package(self):
|
||||
loader = self.find('__phello__.spam', ['__phello__'])
|
||||
self.assertTrue(hasattr(loader, 'load_module'))
|
||||
|
||||
12
Lib/test/test_importlib/frozen/test_loader.py
vendored
12
Lib/test/test_importlib/frozen/test_loader.py
vendored
@@ -77,8 +77,6 @@ class ExecModuleTests(abc.LoaderTests):
|
||||
self.assertTrue(hasattr(module, '__spec__'))
|
||||
self.assertEqual(module.__spec__.loader_state.origname, name)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_package(self):
|
||||
name = '__phello__'
|
||||
module, output = self.exec_module(name)
|
||||
@@ -92,8 +90,6 @@ class ExecModuleTests(abc.LoaderTests):
|
||||
self.assertEqual(output, 'Hello world!\n')
|
||||
self.assertEqual(module.__spec__.loader_state.origname, name)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_lacking_parent(self):
|
||||
name = '__phello__.spam'
|
||||
with util.uncache('__phello__'):
|
||||
@@ -146,6 +142,8 @@ class LoaderTests(abc.LoaderTests):
|
||||
module.main()
|
||||
return module, stdout
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_module(self):
|
||||
module, stdout = self.load_module('__hello__')
|
||||
filename = resolve_stdlib_file('__hello__')
|
||||
@@ -158,6 +156,8 @@ class LoaderTests(abc.LoaderTests):
|
||||
self.assertEqual(getattr(module, attr, None), value)
|
||||
self.assertEqual(stdout.getvalue(), 'Hello world!\n')
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_package(self):
|
||||
module, stdout = self.load_module('__phello__')
|
||||
filename = resolve_stdlib_file('__phello__', ispkg=True)
|
||||
@@ -175,6 +175,8 @@ class LoaderTests(abc.LoaderTests):
|
||||
(attr, attr_value, value))
|
||||
self.assertEqual(stdout.getvalue(), 'Hello world!\n')
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_lacking_parent(self):
|
||||
with util.uncache('__phello__'):
|
||||
module, stdout = self.load_module('__phello__.spam')
|
||||
@@ -248,8 +250,6 @@ class InspectLoaderTests:
|
||||
result = self.machinery.FrozenImporter.get_source('__hello__')
|
||||
self.assertIsNone(result)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_is_package(self):
|
||||
# Should be able to tell what is a package.
|
||||
test_for = (('__hello__', False), ('__phello__', True),
|
||||
|
||||
@@ -158,7 +158,7 @@ class ThreadedImportTests(unittest.TestCase):
|
||||
finally:
|
||||
sys.meta_path.remove(finder)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
# TODO: RUSTPYTHON; maybe hang?
|
||||
@unittest.expectedFailure
|
||||
def test_parallel_path_hooks(self):
|
||||
# Here the Finder instance is only used to check concurrent calls
|
||||
|
||||
Reference in New Issue
Block a user