]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-138801: re-enable `pyrepl` tests on Windows (#138802)
authorChris Eibl <138194463+chris-eibl@users.noreply.github.com>
Fri, 12 Sep 2025 07:47:43 +0000 (09:47 +0200)
committerGitHub <noreply@github.com>
Fri, 12 Sep 2025 07:47:43 +0000 (10:47 +0300)
Lib/test/test_pyrepl/__init__.py

index 8ef472eb0cffaf4ccb8754dd61e3dccef0702755..2f37bff6df8b4a4008678be3d1f7622e33aee323 100644 (file)
@@ -1,14 +1,10 @@
 import os
-from test.support import load_package_tests
-import unittest
+import sys
+from test.support import import_helper, load_package_tests
 
 
-try:
-    import termios
-except ImportError:
-    raise unittest.SkipTest("termios required")
-else:
-    del termios
+if sys.platform != "win32":
+    import_helper.import_module("termios")
 
 
 def load_tests(*args):