https://github.com/python/cpython/commit/4c387a76f3ac8509c29634f4bbda6c37a67550d5
commit: 4c387a76f3ac8509c29634f4bbda6c37a67550d5
branch: main
author: Ćukasz Langa <[email protected]>
committer: ambv <[email protected]>
date: 2024-05-31T14:41:26+02:00
summary:
gh-111201: [pyrepl] Ensure optional platform-specific imports are optional
(GH-119834)
files:
M Lib/test/test_pyrepl/test_windows_console.py
diff --git a/Lib/test/test_pyrepl/test_windows_console.py
b/Lib/test/test_pyrepl/test_windows_console.py
index e87dfe99b1a17d..60392e231508b6 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
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]