diff options
author | Ćukasz Langa <lukasz@langa.pl> | 2024-05-31 12:41:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 12:41:26 (GMT) |
commit | 4c387a76f3ac8509c29634f4bbda6c37a67550d5 (patch) | |
tree | c531c86ab8d7103ebfecb62241390646d5152876 | |
parent | 0e8d35b931f41210483cc51c4169e9a943c7f166 (diff) | |
download | cpython-4c387a76f3ac8509c29634f4bbda6c37a67550d5.zip cpython-4c387a76f3ac8509c29634f4bbda6c37a67550d5.tar.gz cpython-4c387a76f3ac8509c29634f4bbda6c37a67550d5.tar.bz2 |
gh-111201: [pyrepl] Ensure optional platform-specific imports are optional (GH-119834)
-rw-r--r-- | Lib/test/test_pyrepl/test_windows_console.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_pyrepl/test_windows_console.py b/Lib/test/test_pyrepl/test_windows_console.py index e87dfe9..60392e2 100644 --- a/Lib/test/test_pyrepl/test_windows_console.py +++ b/Lib/test/test_pyrepl/test_windows_console.py @@ -1,24 +1,24 @@ import itertools import sys import unittest -from _pyrepl.console import Event, Console -from _pyrepl.windows_console import ( - MOVE_LEFT, - MOVE_RIGHT, - MOVE_UP, - MOVE_DOWN, - ERASE_IN_LINE, -) + from functools import partial from typing import Iterable -from unittest import TestCase, main -from unittest.mock import MagicMock, call, patch, ANY +from unittest import TestCase +from unittest.mock import MagicMock, call from .support import handle_all_events, code_to_events try: - from _pyrepl.console import Event - from _pyrepl.windows_console import WindowsConsole + from _pyrepl.console import Event, Console + from _pyrepl.windows_console import ( + WindowsConsole, + MOVE_LEFT, + MOVE_RIGHT, + MOVE_UP, + MOVE_DOWN, + ERASE_IN_LINE, + ) except ImportError: pass |