Skip to content

Commit

Permalink
[3.13] gh-111201: Skip pyrepl Windows tests earlier (#119848) (#119924)
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 91601a5)
  • Loading branch information
vstinner authored Jun 1, 2024
1 parent 225c3cd commit ac35d96
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/test/test_pyrepl/test_windows_console.py
Original file line number Diff line number Diff line change
@@ -1,6 +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
Expand All @@ -22,7 +27,6 @@
pass


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

0 comments on commit ac35d96

Please sign in to comment.