summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyrepl/__init__.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-31 15:18:28 (GMT)
committerGitHub <noreply@github.com>2024-05-31 15:18:28 (GMT)
commitd6faac6d1f825405398158272286aaed94eb51fc (patch)
tree3b06fc114183c3185556756f3d36172f2b06fc08 /Lib/test/test_pyrepl/__init__.py
parent6e57bd01e00d40dfe7c9344d0b528d9059b1fa93 (diff)
downloadcpython-d6faac6d1f825405398158272286aaed94eb51fc.zip
cpython-d6faac6d1f825405398158272286aaed94eb51fc.tar.gz
cpython-d6faac6d1f825405398158272286aaed94eb51fc.tar.bz2
[3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850)
(cherry picked from commit 0d07182821fad7b95a043d006f1ce13a2d22edcb) Co-authored-by: Dino Viehland <dinoviehland@gmail.com> 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 fa38b86..8359d98 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):