Skip to content

Commit 8daffa7

Browse files
committed
Mark failing tests of test_import
1 parent d55f554 commit 8daffa7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Lib/test/test_import/__init__.py

Lines changed: 23 additions & 0 deletions
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.
@@ -484,6 +492,7 @@ def run():
484492
finally:
485493
del sys.path[0]
486494

495+
@unittest.expectedFailure
487496
@unittest.skipUnless(sys.platform == "win32", "Windows-specific")
488497
def test_dll_dependency_import(self):
489498
from _winapi import GetModuleFileName
@@ -674,6 +683,8 @@ def test_basics(self):
674683
self.assertEqual(mod.code_filename, self.file_name)
675684
self.assertEqual(mod.func_filename, self.file_name)
676685

686+
# TODO: RUSTPYTHON
687+
@unittest.expectedFailure
677688
def test_incorrect_code_name(self):
678689
py_compile.compile(self.file_name, dfile="another_module.py")
679690
mod = self.import_module()
@@ -833,6 +844,8 @@ def test_import_from_unloaded_package(self):
833844

834845

835846
class OverridingImportBuiltinTests(unittest.TestCase):
847+
# TODO: RUSTPYTHON
848+
@unittest.expectedFailure
836849
def test_override_builtin(self):
837850
# Test that overriding builtins.__import__ can bypass sys.modules.
838851
import os
@@ -1342,6 +1355,8 @@ def test_rebinding(self):
13421355
from test.test_import.data.circular_imports.subpkg import util
13431356
self.assertIs(util.util, rebinding.util)
13441357

1358+
# TODO: RUSTPYTHON
1359+
@unittest.expectedFailure
13451360
def test_binding(self):
13461361
try:
13471362
import test.test_import.data.circular_imports.binding
@@ -1352,6 +1367,8 @@ def test_crossreference1(self):
13521367
import test.test_import.data.circular_imports.use
13531368
import test.test_import.data.circular_imports.source
13541369

1370+
# TODO: RUSTPYTHON
1371+
@unittest.expectedFailure
13551372
def test_crossreference2(self):
13561373
with self.assertRaises(AttributeError) as cm:
13571374
import test.test_import.data.circular_imports.source
@@ -1361,6 +1378,8 @@ def test_crossreference2(self):
13611378
self.assertIn('partially initialized module', errmsg)
13621379
self.assertIn('circular import', errmsg)
13631380

1381+
# TODO: RUSTPYTHON
1382+
@unittest.expectedFailure
13641383
def test_circular_from_import(self):
13651384
with self.assertRaises(ImportError) as cm:
13661385
import test.test_import.data.circular_imports.from_cycle1
@@ -1371,6 +1390,8 @@ def test_circular_from_import(self):
13711390
str(cm.exception),
13721391
)
13731392

1393+
# TODO: RUSTPYTHON
1394+
@unittest.expectedFailure
13741395
def test_absolute_circular_submodule(self):
13751396
with self.assertRaises(AttributeError) as cm:
13761397
import test.test_import.data.circular_imports.subpkg2.parent
@@ -1381,6 +1402,8 @@ def test_absolute_circular_submodule(self):
13811402
str(cm.exception),
13821403
)
13831404

1405+
# TODO: RUSTPYTHON
1406+
@unittest.expectedFailure
13841407
def test_unwritable_module(self):
13851408
self.addCleanup(unload, "test.test_import.data.unwritable")
13861409
self.addCleanup(unload, "test.test_import.data.unwritable.x")

0 commit comments

Comments
 (0)