]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-120417: Modify test_bdb to use the import (#120628)
authorVictor Stinner <vstinner@python.org>
Mon, 17 Jun 2024 19:06:18 +0000 (21:06 +0200)
committerGitHub <noreply@github.com>
Mon, 17 Jun 2024 19:06:18 +0000 (21:06 +0200)
Run test_module_for_bdb with a specific namespace.

Lib/test/test_bdb.py

index ed1a63daea11869c8fe3043187e7db1cf6f7c122..10c58c04dfd25e98a95b1113925ca7e87250312a 100644 (file)
@@ -1046,8 +1046,9 @@ class RunTestCase(BaseTestCase):
                 ('return', 1, '<module>'), ('quit', ),
             ]
             import test_module_for_bdb
+            ns = {'test_module_for_bdb': test_module_for_bdb}
             with TracerRun(self) as tracer:
-                tracer.runeval('test_module_for_bdb.main()', globals(), locals())
+                tracer.runeval('test_module_for_bdb.main()', ns, ns)
 
 class IssuesTestCase(BaseTestCase):
     """Test fixed bdb issues."""