Skip to content

Commit ef87fbe

Browse files
committed
unksip test_imp.py
1 parent c37c1bb commit ef87fbe

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

Lib/test/test_imp.py

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,16 @@ class ImportTests(unittest.TestCase):
6363
# self.test_strings = mod.test_strings
6464
# self.test_path = mod.__path__
6565

66-
@unittest.skip("TODO: RUSTPYTHON")
66+
# TODO: RUSTPYTHON
67+
@unittest.expectedFailure
6768
def test_import_encoded_module(self):
6869
for modname, encoding, teststr in self.test_strings:
6970
mod = importlib.import_module('test.encoded_modules.'
7071
'module_' + modname)
7172
self.assertEqual(teststr, mod.test)
7273

73-
@unittest.skip("TODO: RUSTPYTHON")
74+
# TODO: RUSTPYTHON
75+
@unittest.expectedFailure
7476
def test_find_module_encoding(self):
7577
for mod, encoding, _ in self.test_strings:
7678
with imp.find_module('module_' + mod, self.test_path)[0] as fd:
@@ -80,7 +82,8 @@ def test_find_module_encoding(self):
8082
with self.assertRaises(SyntaxError):
8183
imp.find_module('badsyntax_pep3120', path)
8284

83-
@unittest.skip("TODO: RUSTPYTHON")
85+
# TODO: RUSTPYTHON
86+
@unittest.expectedFailure
8487
def test_issue1267(self):
8588
for mod, encoding, _ in self.test_strings:
8689
fp, filename, info = imp.find_module('module_' + mod,
@@ -100,7 +103,8 @@ def test_issue1267(self):
100103
self.assertEqual(fp.readline(),
101104
'"""Tokenization help for Python programs.\n')
102105

103-
@unittest.skip("TODO: RUSTPYTHON")
106+
# TODO: RUSTPYTHON
107+
@unittest.expectedFailure
104108
def test_issue3594(self):
105109
temp_mod_name = 'test_imp_helper'
106110
sys.path.insert(0, '.')
@@ -115,7 +119,8 @@ def test_issue3594(self):
115119
support.unlink(temp_mod_name + '.py')
116120
support.unlink(temp_mod_name + '.pyc')
117121

118-
@unittest.skip("TODO: RUSTPYTHON")
122+
# TODO: RUSTPYTHON
123+
@unittest.expectedFailure
119124
def test_issue5604(self):
120125
# Test cannot cover imp.load_compiled function.
121126
# Martin von Loewis note what shared library cannot have non-ascii
@@ -203,13 +208,15 @@ def test_issue5604(self):
203208
support.rmtree(test_package_name)
204209
support.rmtree('__pycache__')
205210

206-
@unittest.skip("TODO: RUSTPYTHON")
211+
# TODO: RUSTPYTHON
212+
@unittest.expectedFailure
207213
def test_issue9319(self):
208214
path = os.path.dirname(__file__)
209215
self.assertRaises(SyntaxError,
210216
imp.find_module, "badsyntax_pep3120", [path])
211217

212-
@unittest.skip("TODO: RUSTPYTHON")
218+
# TODO: RUSTPYTHON
219+
@unittest.expectedFailure
213220
def test_load_from_source(self):
214221
# Verify that the imp module can correctly load and find .py files
215222
# XXX (ncoghlan): It would be nice to use support.CleanImport
@@ -313,15 +320,13 @@ def test_bug7732(self):
313320
self.assertRaisesRegex(ImportError, '^No module',
314321
imp.find_module, support.TESTFN, ["."])
315322

316-
@unittest.skip("TODO: RUSTPYTHON")
317323
def test_multiple_calls_to_get_data(self):
318324
# Issue #18755: make sure multiple calls to get_data() can succeed.
319325
loader = imp._LoadSourceCompatibility('imp', imp.__file__,
320326
open(imp.__file__))
321327
loader.get_data(imp.__file__) # File should be closed
322328
loader.get_data(imp.__file__) # Will need to create a newly opened file
323329

324-
@unittest.skip("TODO: RUSTPYTHON")
325330
def test_load_source(self):
326331
# Create a temporary module since load_source(name) modifies
327332
# sys.modules[name] attributes like __loader___
@@ -359,7 +364,8 @@ def test_source_hash(self):
359364
self.assertEqual(_imp.source_hash(42, b'hi'), b'\xc6\xe7Z\r\x03:}\xab')
360365
self.assertEqual(_imp.source_hash(43, b'hi'), b'\x85\x9765\xf8\x9a\x8b9')
361366

362-
@unittest.skip("TODO: RUSTPYTHON")
367+
# TODO: RUSTPYTHON
368+
@unittest.expectedFailure
363369
def test_pyc_invalidation_mode_from_cmdline(self):
364370
cases = [
365371
([], "default"),
@@ -375,7 +381,8 @@ def test_pyc_invalidation_mode_from_cmdline(self):
375381
res = script_helper.assert_python_ok(*args)
376382
self.assertEqual(res.out.strip().decode('utf-8'), expected)
377383

378-
@unittest.skip("TODO: RUSTPYTHON")
384+
# TODO: RUSTPYTHON
385+
@unittest.expectedFailure
379386
def test_find_and_load_checked_pyc(self):
380387
# issue 34056
381388
with support.temp_cwd():

0 commit comments

Comments
 (0)