Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-120678: pyrepl: Include globals from modules passed with -i #120904

Merged
merged 9 commits into from
Jul 17, 2024
Prev Previous commit
Next Next commit
nits
  • Loading branch information
AlexWaygood committed Jun 26, 2024
commit bc03ac065b414ea3410b416f5b48a3bf6e553fe0
14 changes: 7 additions & 7 deletions Lib/test/test_pyrepl/test_pyrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ def test_globals_from_file_passed_included_in_repl_globals(self):
output, exit_code = self.run_repl(
["FOO", "exit"], main_module=str(fake_main)
)
if "can\'t use pyrepl" in output:
if "can't use pyrepl" in output:
self.skipTest("pyrepl not available")
self.assertEqual(exit_code, 0)
self.assertIn("42", output)
Expand All @@ -878,12 +878,12 @@ def test_dumb_terminal_exits_cleanly(self):
self.assertNotIn("Traceback", output)

def run_repl(
self,
repl_input: str | list[str],
env: dict | None = None,
*,
main_module: str | None = None
) -> tuple[str, int]:
self,
repl_input: str | list[str],
env: dict | None = None,
*,
main_module: str | None = None,
) -> tuple[str, int]:
master_fd, slave_fd = pty.openpty()
repl_args = [sys.executable, "-u", "-i"]
if main_module is not None:
Expand Down
Loading