We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3aa6f6 commit 35ffc98Copy full SHA for 35ffc98
Lib/test/test_repl.py
@@ -198,6 +198,16 @@ def bar(x):
198
def test_asyncio_repl_no_tty_fails(self):
199
assert assert_python_failure("-m", "asyncio")
200
201
+ def test_asyncio_repl_non_blocking_does_not_fail(self):
202
+ import os, sys
203
+ from _pyrepl.unix_console import UnixConsole
204
+
205
+ os.set_blocking(sys.stdin.fileno(), False)
206
+ console = UnixConsole()
207
208
+ # get_event would throw a BlockingIOError before fixing gh-121662 in this scenario
209
+ assert console.get_event(block=False) is None
210
211
212
class TestInteractiveModeSyntaxErrors(unittest.TestCase):
213
0 commit comments