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
mark hanging/failing tests
  • Loading branch information
youknowone committed Aug 17, 2022
commit 9a40c87dbd89b7ee40cc6cb0d3bb03f14c6c663a
6 changes: 6 additions & 0 deletions Lib/importlib/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def name(self):
(name,) = self.args
return name

# TODO: RUSTPYTHON; the entire setter is added to avoid errors
@name.setter
def name(self, value):
import sys
sys.stderr.write("set value to PackageNotFoundError ignored\n")


class Sectioned:
"""
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_importlib/source/test_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ def test_ignore_file(self):
found = self._find(finder, 'doesnotexist')
self.assertEqual(found, self.NOT_FOUND)

# TODO: RUSTPYTHON
if sys.platform == 'win32':
test_ignore_file = unittest.expectedFailure(test_ignore_file)


class FinderTestsPEP451(FinderTests):

Expand Down
8 changes: 4 additions & 4 deletions Lib/test/test_importlib/test_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ def test_all_locks(self):
self.assertEqual(0, len(self.bootstrap._module_locks),
self.bootstrap._module_locks)


(Frozen_LifetimeTests,
Source_LifetimeTests
) = test_util.test_both(LifetimeTests, init=init)
# TODO: RUSTPYTHON
# (Frozen_LifetimeTests,
# Source_LifetimeTests
# ) = test_util.test_both(LifetimeTests, init=init)


def setUpModule():
Expand Down
3 changes: 3 additions & 0 deletions Lib/test/test_importlib/test_metadata_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def test_retrieves_version_of_distinfo_pkg(self):
assert isinstance(pkg_version, str)
assert re.match(self.version_pattern, pkg_version)

# TODO: RUSTPYTHON
Comment thread
youknowone marked this conversation as resolved.
def test_for_name_does_not_exist(self):
with self.assertRaises(PackageNotFoundError):
distribution('does-not-exist')
Expand Down Expand Up @@ -172,6 +173,8 @@ def test_entry_points_groups_get(self):
entry_points().get('entries', 'default') == entry_points()['entries']
entry_points().get('missing', ()) == ()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_entry_points_allows_no_attributes(self):
ep = entry_points().select(group='entries', name='main')
with self.assertRaises(AttributeError):
Expand Down
6 changes: 6 additions & 0 deletions Lib/test/test_importlib/test_open.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ def setUp(self):

self.data = namespacedata01

# TODO: RUSTPYTHON
import sys
if sys.platform == 'win32':
@unittest.expectedFailure
def test_open_text_default_encoding(self):
super().test_open_text_default_encoding()

class OpenZipTests(OpenTests, util.ZipSetup, unittest.TestCase):
pass
Expand Down
7 changes: 4 additions & 3 deletions Lib/test/test_importlib/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,10 @@ def test_spec_from_file_location_relative_path(self):
self.assertEqual(spec.cached, self.cached)
self.assertTrue(spec.has_location)

(Frozen_FactoryTests,
Source_FactoryTests
) = test_util.test_both(FactoryTests, util=util, machinery=machinery)
# TODO: RUSTPYTHON
# (Frozen_FactoryTests,
# Source_FactoryTests
# ) = test_util.test_both(FactoryTests, util=util, machinery=machinery)


if __name__ == '__main__':
Expand Down
11 changes: 11 additions & 0 deletions Lib/test/test_importlib/test_threaded_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,13 @@ def check_parallel_module_init(self, mock_os):
if verbose:
print("OK.")

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_parallel_module_init(self):
self.check_parallel_module_init()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_parallel_meta_path(self):
finder = Finder()
sys.meta_path.insert(0, finder)
Expand All @@ -152,6 +156,8 @@ def test_parallel_meta_path(self):
finally:
sys.meta_path.remove(finder)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_parallel_path_hooks(self):
# Here the Finder instance is only used to check concurrent calls
# to path_hook().
Expand Down Expand Up @@ -245,6 +251,7 @@ def target():
__import__(TESTFN)
del sys.modules[TESTFN]

@unittest.skip("TODO: RUSTPYTHON; hang")
def test_concurrent_futures_circular_import(self):
# Regression test for bpo-43515
fn = os.path.join(os.path.dirname(__file__),
Expand All @@ -257,6 +264,10 @@ def test_multiprocessing_pool_circular_import(self):
'partial', 'pool_in_threads.py')
script_helper.assert_python_ok(fn)

# TODO: RUSTPYTHON
if sys.platform == 'win32':
test_multiprocessing_pool_circular_import = unittest.expectedFailure(test_multiprocessing_pool_circular_import)


def setUpModule():
thread_info = threading_helper.threading_setup()
Expand Down