Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix test_import
  • Loading branch information
youknowone committed Dec 27, 2025
commit 3ccf37ced03029c0585c14dd8f1db59d74fcc82d
2 changes: 0 additions & 2 deletions Lib/test/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ def check_iter_pickle(self, it, seq, proto):
it = pickle.loads(d)
self.assertEqual(list(it), seq[1:])

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_import(self):
__import__('sys')
__import__('time')
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1403,8 +1403,6 @@ def test_absolute_circular_submodule(self):
str(cm.exception),
)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_unwritable_module(self):
self.addCleanup(unload, "test.test_import.data.unwritable")
self.addCleanup(unload, "test.test_import.data.unwritable.x")
Expand Down
4 changes: 0 additions & 4 deletions Lib/test/test_importlib/import_/test___package__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def test_using___name__(self):
'__path__': []})
self.assertEqual(module.__name__, 'pkg')

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_warn_when_using___name__(self):
with self.assertWarns(ImportWarning):
self.import_module({'__name__': 'pkg.fake', '__path__': []})
Expand All @@ -75,8 +73,6 @@ def test_spec_fallback(self):
module = self.import_module({'__spec__': FakeSpec('pkg.fake')})
self.assertEqual(module.__name__, 'pkg')

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_warn_when_package_and_spec_disagree(self):
# Raise a DeprecationWarning if __package__ != __spec__.parent.
with self.assertWarns(DeprecationWarning):
Expand Down
8 changes: 0 additions & 8 deletions Lib/test/test_importlib/import_/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ def test_gh86298_loader_is_none_and_spec_loader_is_none(self):
ValueError,
_bootstrap_external._bless_my_loader, bar.__dict__)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_gh86298_no_spec(self):
bar = ModuleType('bar')
bar.__loader__ = object()
Expand All @@ -137,8 +135,6 @@ def test_gh86298_no_spec(self):
DeprecationWarning,
_bootstrap_external._bless_my_loader, bar.__dict__)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_gh86298_spec_is_none(self):
bar = ModuleType('bar')
bar.__loader__ = object()
Expand All @@ -148,8 +144,6 @@ def test_gh86298_spec_is_none(self):
DeprecationWarning,
_bootstrap_external._bless_my_loader, bar.__dict__)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_gh86298_no_spec_loader(self):
bar = ModuleType('bar')
bar.__loader__ = object()
Expand All @@ -159,8 +153,6 @@ def test_gh86298_no_spec_loader(self):
DeprecationWarning,
_bootstrap_external._bless_my_loader, bar.__dict__)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_gh86298_loader_and_spec_loader_disagree(self):
bar = ModuleType('bar')
bar.__loader__ = object()
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_importlib/import_/test_meta_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def test_continuing(self):
with util.import_state(meta_path=[first, second]):
self.assertIs(self.__import__(mod_name), second.modules[mod_name])

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_empty(self):
# Raise an ImportWarning if sys.meta_path is empty.
module_name = 'nothing'
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_importlib/import_/test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ def test_path_hooks(self):
self.assertIn(path, sys.path_importer_cache)
self.assertIs(sys.path_importer_cache[path], importer)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_empty_path_hooks(self):
# Test that if sys.path_hooks is empty a warning is raised,
# sys.path_importer_cache gets None set, and PathFinder returns None.
Expand Down
Loading