Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit adb074a

Browse files
committed
Fix windows
1 parent bc49d05 commit adb074a

File tree

3 files changed

+146879
-2
lines changed

3 files changed

+146879
-2
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import io
33
import itertools
44
import os
5-
import pty
65
import rlcompleter
76
import select
87
import subprocess
98
import sys
10-
import termios
119
from unittest import TestCase
1210
from unittest.mock import patch
1311
from test.support import force_not_colorized
@@ -859,6 +857,10 @@ def test_dumb_terminal_exits_cleanly(self):
859857
self.assertNotIn("Traceback", output)
860858

861859
def run_repl(self, repl_input: str | list[str], env: dict | None = None) -> tuple[str, int]:
860+
try:
861+
import pty
862+
except ImportError:
863+
self.skipTest("pty module not available")
862864
master_fd, slave_fd = pty.openpty()
863865
process = subprocess.Popen(
864866
[sys.executable, "-i", "-u"],

0 commit comments

Comments
 (0)