Skip to content

Commit b3a16bc

Browse files
committed
gh-111201: Skip pyrepl Windows tests earlier
Don't attempt to load pyrepl Windows console if platforms others than Windows. For example, the import can fail if ctypes is missing.
1 parent 4c387a7 commit b3a16bc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/test_pyrepl/test_windows_console.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import itertools
21
import sys
32
import unittest
43

4+
if sys.platform != 'win32':
5+
raise unittest.SkipTest("test only relevant on win32")
6+
7+
8+
import itertools
59
from functools import partial
610
from typing import Iterable
711
from unittest import TestCase
@@ -23,7 +27,6 @@
2327
pass
2428

2529

26-
@unittest.skipIf(sys.platform != "win32", "Test class specifically for Windows")
2730
class WindowsConsoleTests(TestCase):
2831
def console(self, events, **kwargs) -> Console:
2932
console = WindowsConsole()

0 commit comments

Comments
 (0)