@@ -63,14 +63,16 @@ class ImportTests(unittest.TestCase):
63
63
# self.test_strings = mod.test_strings
64
64
# self.test_path = mod.__path__
65
65
66
- @unittest .skip ("TODO: RUSTPYTHON" )
66
+ # TODO: RUSTPYTHON
67
+ @unittest .expectedFailure
67
68
def test_import_encoded_module (self ):
68
69
for modname , encoding , teststr in self .test_strings :
69
70
mod = importlib .import_module ('test.encoded_modules.'
70
71
'module_' + modname )
71
72
self .assertEqual (teststr , mod .test )
72
73
73
- @unittest .skip ("TODO: RUSTPYTHON" )
74
+ # TODO: RUSTPYTHON
75
+ @unittest .expectedFailure
74
76
def test_find_module_encoding (self ):
75
77
for mod , encoding , _ in self .test_strings :
76
78
with imp .find_module ('module_' + mod , self .test_path )[0 ] as fd :
@@ -80,7 +82,8 @@ def test_find_module_encoding(self):
80
82
with self .assertRaises (SyntaxError ):
81
83
imp .find_module ('badsyntax_pep3120' , path )
82
84
83
- @unittest .skip ("TODO: RUSTPYTHON" )
85
+ # TODO: RUSTPYTHON
86
+ @unittest .expectedFailure
84
87
def test_issue1267 (self ):
85
88
for mod , encoding , _ in self .test_strings :
86
89
fp , filename , info = imp .find_module ('module_' + mod ,
@@ -100,7 +103,8 @@ def test_issue1267(self):
100
103
self .assertEqual (fp .readline (),
101
104
'"""Tokenization help for Python programs.\n ' )
102
105
103
- @unittest .skip ("TODO: RUSTPYTHON" )
106
+ # TODO: RUSTPYTHON
107
+ @unittest .expectedFailure
104
108
def test_issue3594 (self ):
105
109
temp_mod_name = 'test_imp_helper'
106
110
sys .path .insert (0 , '.' )
@@ -115,7 +119,8 @@ def test_issue3594(self):
115
119
support .unlink (temp_mod_name + '.py' )
116
120
support .unlink (temp_mod_name + '.pyc' )
117
121
118
- @unittest .skip ("TODO: RUSTPYTHON" )
122
+ # TODO: RUSTPYTHON
123
+ @unittest .expectedFailure
119
124
def test_issue5604 (self ):
120
125
# Test cannot cover imp.load_compiled function.
121
126
# Martin von Loewis note what shared library cannot have non-ascii
@@ -203,13 +208,15 @@ def test_issue5604(self):
203
208
support .rmtree (test_package_name )
204
209
support .rmtree ('__pycache__' )
205
210
206
- @unittest .skip ("TODO: RUSTPYTHON" )
211
+ # TODO: RUSTPYTHON
212
+ @unittest .expectedFailure
207
213
def test_issue9319 (self ):
208
214
path = os .path .dirname (__file__ )
209
215
self .assertRaises (SyntaxError ,
210
216
imp .find_module , "badsyntax_pep3120" , [path ])
211
217
212
- @unittest .skip ("TODO: RUSTPYTHON" )
218
+ # TODO: RUSTPYTHON
219
+ @unittest .expectedFailure
213
220
def test_load_from_source (self ):
214
221
# Verify that the imp module can correctly load and find .py files
215
222
# XXX (ncoghlan): It would be nice to use support.CleanImport
@@ -313,15 +320,13 @@ def test_bug7732(self):
313
320
self .assertRaisesRegex (ImportError , '^No module' ,
314
321
imp .find_module , support .TESTFN , ["." ])
315
322
316
- @unittest .skip ("TODO: RUSTPYTHON" )
317
323
def test_multiple_calls_to_get_data (self ):
318
324
# Issue #18755: make sure multiple calls to get_data() can succeed.
319
325
loader = imp ._LoadSourceCompatibility ('imp' , imp .__file__ ,
320
326
open (imp .__file__ ))
321
327
loader .get_data (imp .__file__ ) # File should be closed
322
328
loader .get_data (imp .__file__ ) # Will need to create a newly opened file
323
329
324
- @unittest .skip ("TODO: RUSTPYTHON" )
325
330
def test_load_source (self ):
326
331
# Create a temporary module since load_source(name) modifies
327
332
# sys.modules[name] attributes like __loader___
@@ -359,7 +364,8 @@ def test_source_hash(self):
359
364
self .assertEqual (_imp .source_hash (42 , b'hi' ), b'\xc6 \xe7 Z\r \x03 :}\xab ' )
360
365
self .assertEqual (_imp .source_hash (43 , b'hi' ), b'\x85 \x97 65\xf8 \x9a \x8b 9' )
361
366
362
- @unittest .skip ("TODO: RUSTPYTHON" )
367
+ # TODO: RUSTPYTHON
368
+ @unittest .expectedFailure
363
369
def test_pyc_invalidation_mode_from_cmdline (self ):
364
370
cases = [
365
371
([], "default" ),
@@ -375,7 +381,8 @@ def test_pyc_invalidation_mode_from_cmdline(self):
375
381
res = script_helper .assert_python_ok (* args )
376
382
self .assertEqual (res .out .strip ().decode ('utf-8' ), expected )
377
383
378
- @unittest .skip ("TODO: RUSTPYTHON" )
384
+ # TODO: RUSTPYTHON
385
+ @unittest .expectedFailure
379
386
def test_find_and_load_checked_pyc (self ):
380
387
# issue 34056
381
388
with support .temp_cwd ():
0 commit comments