@@ -87,6 +87,8 @@ def test_from_import_missing_attr_raises_ImportError(self):
87
87
with self .assertRaises (ImportError ):
88
88
from importlib import something_that_should_not_exist_anywhere
89
89
90
+ # TODO: RUSTPYTHON
91
+ @unittest .expectedFailure
90
92
def test_from_import_missing_attr_has_name_and_path (self ):
91
93
with CleanImport ('os' ):
92
94
import os
@@ -121,12 +123,16 @@ def test_from_import_missing_attr_has_name(self):
121
123
self .assertEqual (cm .exception .name , '_warning' )
122
124
self .assertIsNone (cm .exception .path )
123
125
126
+ # TODO: RUSTPYTHON
127
+ @unittest .expectedFailure
124
128
def test_from_import_missing_attr_path_is_canonical (self ):
125
129
with self .assertRaises (ImportError ) as cm :
126
130
from os .path import i_dont_exist
127
131
self .assertIn (cm .exception .name , {'posixpath' , 'ntpath' })
128
132
self .assertIsNotNone (cm .exception )
129
133
134
+ # TODO: RUSTPYTHON
135
+ @unittest .expectedFailure
130
136
def test_from_import_star_invalid_type (self ):
131
137
import re
132
138
with _ready_to_import () as (name , path ):
@@ -421,6 +427,8 @@ def test_from_import_message_for_existing_module(self):
421
427
with self .assertRaisesRegex (ImportError , "^cannot import name 'bogus'" ):
422
428
from re import bogus
423
429
430
+ # TODO: RUSTPYTHON
431
+ @unittest .expectedFailure
424
432
def test_from_import_AttributeError (self ):
425
433
# Issue #24492: trying to import an attribute that raises an
426
434
# AttributeError should lead to an ImportError.
@@ -484,6 +492,7 @@ def run():
484
492
finally :
485
493
del sys .path [0 ]
486
494
495
+ @unittest .expectedFailure
487
496
@unittest .skipUnless (sys .platform == "win32" , "Windows-specific" )
488
497
def test_dll_dependency_import (self ):
489
498
from _winapi import GetModuleFileName
@@ -674,6 +683,8 @@ def test_basics(self):
674
683
self .assertEqual (mod .code_filename , self .file_name )
675
684
self .assertEqual (mod .func_filename , self .file_name )
676
685
686
+ # TODO: RUSTPYTHON
687
+ @unittest .expectedFailure
677
688
def test_incorrect_code_name (self ):
678
689
py_compile .compile (self .file_name , dfile = "another_module.py" )
679
690
mod = self .import_module ()
@@ -833,6 +844,8 @@ def test_import_from_unloaded_package(self):
833
844
834
845
835
846
class OverridingImportBuiltinTests (unittest .TestCase ):
847
+ # TODO: RUSTPYTHON
848
+ @unittest .expectedFailure
836
849
def test_override_builtin (self ):
837
850
# Test that overriding builtins.__import__ can bypass sys.modules.
838
851
import os
@@ -1342,6 +1355,8 @@ def test_rebinding(self):
1342
1355
from test .test_import .data .circular_imports .subpkg import util
1343
1356
self .assertIs (util .util , rebinding .util )
1344
1357
1358
+ # TODO: RUSTPYTHON
1359
+ @unittest .expectedFailure
1345
1360
def test_binding (self ):
1346
1361
try :
1347
1362
import test .test_import .data .circular_imports .binding
@@ -1352,6 +1367,8 @@ def test_crossreference1(self):
1352
1367
import test .test_import .data .circular_imports .use
1353
1368
import test .test_import .data .circular_imports .source
1354
1369
1370
+ # TODO: RUSTPYTHON
1371
+ @unittest .expectedFailure
1355
1372
def test_crossreference2 (self ):
1356
1373
with self .assertRaises (AttributeError ) as cm :
1357
1374
import test .test_import .data .circular_imports .source
@@ -1361,6 +1378,8 @@ def test_crossreference2(self):
1361
1378
self .assertIn ('partially initialized module' , errmsg )
1362
1379
self .assertIn ('circular import' , errmsg )
1363
1380
1381
+ # TODO: RUSTPYTHON
1382
+ @unittest .expectedFailure
1364
1383
def test_circular_from_import (self ):
1365
1384
with self .assertRaises (ImportError ) as cm :
1366
1385
import test .test_import .data .circular_imports .from_cycle1
@@ -1371,6 +1390,8 @@ def test_circular_from_import(self):
1371
1390
str (cm .exception ),
1372
1391
)
1373
1392
1393
+ # TODO: RUSTPYTHON
1394
+ @unittest .expectedFailure
1374
1395
def test_absolute_circular_submodule (self ):
1375
1396
with self .assertRaises (AttributeError ) as cm :
1376
1397
import test .test_import .data .circular_imports .subpkg2 .parent
@@ -1381,6 +1402,8 @@ def test_absolute_circular_submodule(self):
1381
1402
str (cm .exception ),
1382
1403
)
1383
1404
1405
+ # TODO: RUSTPYTHON
1406
+ @unittest .expectedFailure
1384
1407
def test_unwritable_module (self ):
1385
1408
self .addCleanup (unload , "test.test_import.data.unwritable" )
1386
1409
self .addCleanup (unload , "test.test_import.data.unwritable.x" )
0 commit comments