Skip to content

Commit

Permalink
Fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Jun 11, 2024
1 parent bc49d05 commit adb074a
Show file tree
Hide file tree
Showing 3 changed files with 146,879 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Lib/test/test_pyrepl/test_pyrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import io
import itertools
import os
import pty
import rlcompleter
import select
import subprocess
import sys
import termios
from unittest import TestCase
from unittest.mock import patch
from test.support import force_not_colorized
Expand Down Expand Up @@ -859,6 +857,10 @@ def test_dumb_terminal_exits_cleanly(self):
self.assertNotIn("Traceback", output)

def run_repl(self, repl_input: str | list[str], env: dict | None = None) -> tuple[str, int]:
try:
import pty
except ImportError:
self.skipTest("pty module not available")
master_fd, slave_fd = pty.openpty()
process = subprocess.Popen(
[sys.executable, "-i", "-u"],
Expand Down
Loading

0 comments on commit adb074a

Please sign in to comment.