aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pyrepl/__init__.py
diff options
context:
space:
mode:
authorDino Viehland <dinoviehland@gmail.com>2024-05-31 00:49:03 -0700
committerGitHub <noreply@github.com>2024-05-31 09:49:03 +0200
commit0d07182821fad7b95a043d006f1ce13a2d22edcb (patch)
treedd51773d847f35d791bb9436352d39500845f288 /Lib/test/test_pyrepl/__init__.py
parent13a5fdc72f701c053b96abea48cd8f2775e9418e (diff)
downloadcpython-0d07182821fad7b95a043d006f1ce13a2d22edcb.tar.gz
cpython-0d07182821fad7b95a043d006f1ce13a2d22edcb.zip
gh-111201: Support pyrepl on Windows (#119559)
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com> Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/test/test_pyrepl/__init__.py')
-rw-r--r--Lib/test/test_pyrepl/__init__.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_pyrepl/__init__.py b/Lib/test/test_pyrepl/__init__.py
index fa38b86b847..8359d984462 100644
--- a/Lib/test/test_pyrepl/__init__.py
+++ b/Lib/test/test_pyrepl/__init__.py
@@ -1,12 +1,14 @@
import os
+import sys
from test.support import requires, load_package_tests
from test.support.import_helper import import_module
-# Optionally test pyrepl. This currently requires that the
-# 'curses' resource be given on the regrtest command line using the -u
-# option. Additionally, we need to attempt to import curses and readline.
-requires("curses")
-curses = import_module("curses")
+if sys.platform != "win32":
+ # On non-Windows platforms, testing pyrepl currently requires that the
+ # 'curses' resource be given on the regrtest command line using the -u
+ # option. Additionally, we need to attempt to import curses and readline.
+ requires("curses")
+ curses = import_module("curses")
def load_tests(*args):