From: Daniele Varrazzo Date: Sat, 30 Apr 2022 13:18:14 +0000 (+0200) Subject: test: fix variable scope in ctrl-c test X-Git-Tag: 3.1~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96cb1253cd15fec1d0ea88a7192884285d40dd30;p=thirdparty%2Fpsycopg.git test: fix variable scope in ctrl-c test --- diff --git a/tests/test_concurrency_async.py b/tests/test_concurrency_async.py index 88bdc7d41..3d1b25963 100644 --- a/tests/test_concurrency_async.py +++ b/tests/test_concurrency_async.py @@ -168,9 +168,8 @@ import signal import asyncio import psycopg -ctrl_c = False - async def main(): + ctrl_c = False loop = asyncio.get_event_loop() async with await psycopg.AsyncConnection.connect({dsn!r}) as conn: loop.add_signal_handler(signal.SIGINT, conn.cancel)