Skip to content

Commit 4c387a7

Browse files
authored
gh-111201: [pyrepl] Ensure optional platform-specific imports are optional (GH-119834)
1 parent 0e8d35b commit 4c387a7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Lib/test/test_pyrepl/test_windows_console.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import itertools
22
import sys
33
import unittest
4-
from _pyrepl.console import Event, Console
5-
from _pyrepl.windows_console import (
6-
MOVE_LEFT,
7-
MOVE_RIGHT,
8-
MOVE_UP,
9-
MOVE_DOWN,
10-
ERASE_IN_LINE,
11-
)
4+
125
from functools import partial
136
from typing import Iterable
14-
from unittest import TestCase, main
15-
from unittest.mock import MagicMock, call, patch, ANY
7+
from unittest import TestCase
8+
from unittest.mock import MagicMock, call
169

1710
from .support import handle_all_events, code_to_events
1811

1912
try:
20-
from _pyrepl.console import Event
21-
from _pyrepl.windows_console import WindowsConsole
13+
from _pyrepl.console import Event, Console
14+
from _pyrepl.windows_console import (
15+
WindowsConsole,
16+
MOVE_LEFT,
17+
MOVE_RIGHT,
18+
MOVE_UP,
19+
MOVE_DOWN,
20+
ERASE_IN_LINE,
21+
)
2222
except ImportError:
2323
pass
2424

0 commit comments

Comments
 (0)