Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit adb074a

Browse filesBrowse files
committed
Fix windows
1 parent bc49d05 commit adb074a
Copy full SHA for adb074a

File tree

Expand file treeCollapse file tree

3 files changed

+146879
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+146879
-2
lines changed

‎Lib/test/test_pyrepl/test_pyrepl.py

Copy file name to clipboardExpand all lines: Lib/test/test_pyrepl/test_pyrepl.py
+4-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.