gh-92913: Clarify changes to PyInitConfig.module_search_paths[_set] fields (GH-92980)

This commit is contained in:
Steve Dower 2022-05-19 20:23:53 +01:00 committed by GitHub
parent 3fd8610002
commit 403d16fa28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 8 deletions

View file

@ -236,10 +236,11 @@ class SetConfigTests(unittest.TestCase):
module_search_paths=['a', 'b', 'c'])
self.assertEqual(sys.path, ['a', 'b', 'c'])
# Leave sys.path unchanged if module_search_paths_set=0
# sys.path is reset if module_search_paths_set=0
self.set_config(module_search_paths_set=0,
module_search_paths=['new_path'])
self.assertEqual(sys.path, ['a', 'b', 'c'])
self.assertNotEqual(sys.path, ['a', 'b', 'c'])
self.assertNotEqual(sys.path, ['new_path'])
def test_argv(self):
self.set_config(parse_argv=0,