We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6efdf6 commit b25ddf5Copy full SHA for b25ddf5
1 file changed
Lib/test/test_pdb.py
@@ -4753,6 +4753,16 @@ def foo(self):
4753
stdout, stderr = self.run_pdb_script(script, commands)
4754
self.assertIn("The specified object 'C.foo' is not a function", stdout)
4755
4756
+ def test_pyrepl_available(self):
4757
+ with patch.dict(os.environ, {"PYTHON_BASIC_REPL": "1"}):
4758
+ self.assertFalse(pdb._pyrepl_available())
4759
+
4760
+ with patch.dict(os.environ, {}, clear=True):
4761
+ mod = types.ModuleType("_pyrepl.main")
4762
+ mod.CAN_USE_PYREPL = True
4763
+ with patch.dict("sys.modules", {"_pyrepl.main": mod}):
4764
+ self.assertTrue(pdb._pyrepl_available())
4765
4766
4767
class ChecklineTests(unittest.TestCase):
4768
def setUp(self):
0 commit comments