From aadd19431543798b875b7eedc2a74cd5f85af661 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 17 Jun 2024 13:39:27 +0200 Subject: [PATCH] gh-120417: Modify test_bdb to use the import Run test_module_for_bdb with a specific namespace. --- Lib/test/test_bdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, ''), ('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."""