https://github.com/python/cpython/commit/e73c42e15cf83c7a81de016ce2827c04110c80c3
commit: e73c42e15cf83c7a81de016ce2827c04110c80c3
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2024-06-17T21:06:18+02:00
summary:

gh-120417: Modify test_bdb to use the import (#120628)

Run test_module_for_bdb with a specific namespace.

files:
M Lib/test/test_bdb.py

diff --git a/Lib/test/test_bdb.py b/Lib/test/test_bdb.py
index ed1a63daea1186..10c58c04dfd25e 100644
--- a/Lib/test/test_bdb.py
+++ b/Lib/test/test_bdb.py
@@ -1046,8 +1046,9 @@ def main():
                 ('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."""

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to