diff options
author | Victor Stinner <vstinner@python.org> | 2024-05-31 14:06:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 14:06:10 (GMT) |
commit | 91601a55964fdb3c02b21fa3c8dc629daff2390f (patch) | |
tree | bf8dba68b7a37231fc799b87bf652f6de87ca2c1 | |
parent | 4c387a76f3ac8509c29634f4bbda6c37a67550d5 (diff) | |
download | cpython-91601a55964fdb3c02b21fa3c8dc629daff2390f.zip cpython-91601a55964fdb3c02b21fa3c8dc629daff2390f.tar.gz cpython-91601a55964fdb3c02b21fa3c8dc629daff2390f.tar.bz2 |
gh-111201: Skip pyrepl Windows tests earlier (#119848)
Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.
-rw-r--r-- | Lib/test/test_pyrepl/test_windows_console.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_pyrepl/test_windows_console.py b/Lib/test/test_pyrepl/test_windows_console.py index 60392e2..e52a54d 100644 --- a/Lib/test/test_pyrepl/test_windows_console.py +++ b/Lib/test/test_pyrepl/test_windows_console.py @@ -1,7 +1,11 @@ -import itertools import sys import unittest +if sys.platform != 'win32': + raise unittest.SkipTest("test only relevant on win32") + + +import itertools from functools import partial from typing import Iterable from unittest import TestCase @@ -23,7 +27,6 @@ except ImportError: pass -@unittest.skipIf(sys.platform != "win32", "Test class specifically for Windows") class WindowsConsoleTests(TestCase): def console(self, events, **kwargs) -> Console: console = WindowsConsole() |