Skip to content

Commit 59b51a8

Browse files
committed
Mark failing tests of test_import
1 parent 40ecd8a commit 59b51a8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Lib/test/test_import/__init__.py

+22
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def test_from_import_missing_attr_raises_ImportError(self):
8787
with self.assertRaises(ImportError):
8888
from importlib import something_that_should_not_exist_anywhere
8989

90+
# TODO: RUSTPYTHON
91+
@unittest.expectedFailure
9092
def test_from_import_missing_attr_has_name_and_path(self):
9193
with CleanImport('os'):
9294
import os
@@ -121,12 +123,16 @@ def test_from_import_missing_attr_has_name(self):
121123
self.assertEqual(cm.exception.name, '_warning')
122124
self.assertIsNone(cm.exception.path)
123125

126+
# TODO: RUSTPYTHON
127+
@unittest.expectedFailure
124128
def test_from_import_missing_attr_path_is_canonical(self):
125129
with self.assertRaises(ImportError) as cm:
126130
from os.path import i_dont_exist
127131
self.assertIn(cm.exception.name, {'posixpath', 'ntpath'})
128132
self.assertIsNotNone(cm.exception)
129133

134+
# TODO: RUSTPYTHON
135+
@unittest.expectedFailure
130136
def test_from_import_star_invalid_type(self):
131137
import re
132138
with _ready_to_import() as (name, path):
@@ -421,6 +427,8 @@ def test_from_import_message_for_existing_module(self):
421427
with self.assertRaisesRegex(ImportError, "^cannot import name 'bogus'"):
422428
from re import bogus
423429

430+
# TODO: RUSTPYTHON
431+
@unittest.expectedFailure
424432
def test_from_import_AttributeError(self):
425433
# Issue #24492: trying to import an attribute that raises an
426434
# AttributeError should lead to an ImportError.
@@ -674,6 +682,8 @@ def test_basics(self):
674682
self.assertEqual(mod.code_filename, self.file_name)
675683
self.assertEqual(mod.func_filename, self.file_name)
676684

685+
# TODO: RUSTPYTHON
686+
@unittest.expectedFailure
677687
def test_incorrect_code_name(self):
678688
py_compile.compile(self.file_name, dfile="another_module.py")
679689
mod = self.import_module()
@@ -833,6 +843,8 @@ def test_import_from_unloaded_package(self):
833843

834844

835845
class OverridingImportBuiltinTests(unittest.TestCase):
846+
# TODO: RUSTPYTHON
847+
@unittest.expectedFailure
836848
def test_override_builtin(self):
837849
# Test that overriding builtins.__import__ can bypass sys.modules.
838850
import os
@@ -1342,6 +1354,8 @@ def test_rebinding(self):
13421354
from test.test_import.data.circular_imports.subpkg import util
13431355
self.assertIs(util.util, rebinding.util)
13441356

1357+
# TODO: RUSTPYTHON
1358+
@unittest.expectedFailure
13451359
def test_binding(self):
13461360
try:
13471361
import test.test_import.data.circular_imports.binding
@@ -1352,6 +1366,8 @@ def test_crossreference1(self):
13521366
import test.test_import.data.circular_imports.use
13531367
import test.test_import.data.circular_imports.source
13541368

1369+
# TODO: RUSTPYTHON
1370+
@unittest.expectedFailure
13551371
def test_crossreference2(self):
13561372
with self.assertRaises(AttributeError) as cm:
13571373
import test.test_import.data.circular_imports.source
@@ -1361,6 +1377,8 @@ def test_crossreference2(self):
13611377
self.assertIn('partially initialized module', errmsg)
13621378
self.assertIn('circular import', errmsg)
13631379

1380+
# TODO: RUSTPYTHON
1381+
@unittest.expectedFailure
13641382
def test_circular_from_import(self):
13651383
with self.assertRaises(ImportError) as cm:
13661384
import test.test_import.data.circular_imports.from_cycle1
@@ -1371,6 +1389,8 @@ def test_circular_from_import(self):
13711389
str(cm.exception),
13721390
)
13731391

1392+
# TODO: RUSTPYTHON
1393+
@unittest.expectedFailure
13741394
def test_absolute_circular_submodule(self):
13751395
with self.assertRaises(AttributeError) as cm:
13761396
import test.test_import.data.circular_imports.subpkg2.parent
@@ -1381,6 +1401,8 @@ def test_absolute_circular_submodule(self):
13811401
str(cm.exception),
13821402
)
13831403

1404+
# TODO: RUSTPYTHON
1405+
@unittest.expectedFailure
13841406
def test_unwritable_module(self):
13851407
self.addCleanup(unload, "test.test_import.data.unwritable")
13861408
self.addCleanup(unload, "test.test_import.data.unwritable.x")

0 commit comments

Comments
 (0)