@@ -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.
@@ -674,6 +682,8 @@ def test_basics(self):
674
682
self .assertEqual (mod .code_filename , self .file_name )
675
683
self .assertEqual (mod .func_filename , self .file_name )
676
684
685
+ # TODO: RUSTPYTHON
686
+ @unittest .expectedFailure
677
687
def test_incorrect_code_name (self ):
678
688
py_compile .compile (self .file_name , dfile = "another_module.py" )
679
689
mod = self .import_module ()
@@ -833,6 +843,8 @@ def test_import_from_unloaded_package(self):
833
843
834
844
835
845
class OverridingImportBuiltinTests (unittest .TestCase ):
846
+ # TODO: RUSTPYTHON
847
+ @unittest .expectedFailure
836
848
def test_override_builtin (self ):
837
849
# Test that overriding builtins.__import__ can bypass sys.modules.
838
850
import os
@@ -1342,6 +1354,8 @@ def test_rebinding(self):
1342
1354
from test .test_import .data .circular_imports .subpkg import util
1343
1355
self .assertIs (util .util , rebinding .util )
1344
1356
1357
+ # TODO: RUSTPYTHON
1358
+ @unittest .expectedFailure
1345
1359
def test_binding (self ):
1346
1360
try :
1347
1361
import test .test_import .data .circular_imports .binding
@@ -1352,6 +1366,8 @@ def test_crossreference1(self):
1352
1366
import test .test_import .data .circular_imports .use
1353
1367
import test .test_import .data .circular_imports .source
1354
1368
1369
+ # TODO: RUSTPYTHON
1370
+ @unittest .expectedFailure
1355
1371
def test_crossreference2 (self ):
1356
1372
with self .assertRaises (AttributeError ) as cm :
1357
1373
import test .test_import .data .circular_imports .source
@@ -1361,6 +1377,8 @@ def test_crossreference2(self):
1361
1377
self .assertIn ('partially initialized module' , errmsg )
1362
1378
self .assertIn ('circular import' , errmsg )
1363
1379
1380
+ # TODO: RUSTPYTHON
1381
+ @unittest .expectedFailure
1364
1382
def test_circular_from_import (self ):
1365
1383
with self .assertRaises (ImportError ) as cm :
1366
1384
import test .test_import .data .circular_imports .from_cycle1
@@ -1371,6 +1389,8 @@ def test_circular_from_import(self):
1371
1389
str (cm .exception ),
1372
1390
)
1373
1391
1392
+ # TODO: RUSTPYTHON
1393
+ @unittest .expectedFailure
1374
1394
def test_absolute_circular_submodule (self ):
1375
1395
with self .assertRaises (AttributeError ) as cm :
1376
1396
import test .test_import .data .circular_imports .subpkg2 .parent
@@ -1381,6 +1401,8 @@ def test_absolute_circular_submodule(self):
1381
1401
str (cm .exception ),
1382
1402
)
1383
1403
1404
+ # TODO: RUSTPYTHON
1405
+ @unittest .expectedFailure
1384
1406
def test_unwritable_module (self ):
1385
1407
self .addCleanup (unload , "test.test_import.data.unwritable" )
1386
1408
self .addCleanup (unload , "test.test_import.data.unwritable.x" )
0 commit comments