Skip to content

Commit 69b08c3

Browse files
authored
gh-145057: Fix test names and comments to reflect sys.lazy_modules is a dict, not a set (#146084)
Fix test names and comments to reflect sys.lazy_modules is a dict, not a set
1 parent 73cc1fd commit 69b08c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_lazy_import/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,8 @@ def my_filter(name):
484484
sys.set_lazy_imports_filter(my_filter)
485485
self.assertIs(sys.get_lazy_imports_filter(), my_filter)
486486

487-
def test_lazy_modules_attribute_is_set(self):
488-
"""sys.lazy_modules should be a set per PEP 810."""
487+
def test_lazy_modules_attribute_is_dict(self):
488+
"""sys.lazy_modules should be a dict per PEP 810."""
489489
self.assertIsInstance(sys.lazy_modules, dict)
490490

491491
@support.requires_subprocess()
@@ -966,7 +966,7 @@ def test_module_added_to_lazy_modules_on_lazy_import(self):
966966

967967
def test_lazy_modules_is_per_interpreter(self):
968968
"""Each interpreter should have independent sys.lazy_modules."""
969-
# Basic test that sys.lazy_modules exists and is a set
969+
# Basic test that sys.lazy_modules exists and is a dict
970970
self.assertIsInstance(sys.lazy_modules, dict)
971971

972972

@@ -1575,7 +1575,7 @@ def access_modules(idx):
15751575
self.assertEqual(result.returncode, 0, f"stdout: {result.stdout}, stderr: {result.stderr}")
15761576
self.assertIn("OK", result.stdout)
15771577

1578-
def test_concurrent_lazy_modules_set_updates(self):
1578+
def test_concurrent_lazy_modules_dict_updates(self):
15791579
"""Multiple threads creating lazy imports should safely update sys.lazy_modules."""
15801580
code = textwrap.dedent("""
15811581
import sys

0 commit comments

Comments
 (0)