Fix use of "async" in test_cursor.py

"async" will be a keyword starting with Python 3.7. On Python 3.6, use
of "async" causes a deprecation warning. Use the alias "async_" instead.
This commit is contained in:
Jon Dufresne 2017-12-03 18:47:19 -08:00 committed by Daniele Varrazzo
parent dcadc4c15a
commit 42efb739d8

View File

@ -567,7 +567,7 @@ class CursorTests(ConnectingTestCase):
# Issue #443 is in the async code too. Since the fix is duplicated,
# so is the test.
control_conn = self.conn
connect_func = lambda: self.connect(async=True)
connect_func = lambda: self.connect(async_=True)
wait_func = psycopg2.extras.wait_select
self._test_external_close(control_conn, connect_func, wait_func)