summaryrefslogtreecommitdiff
path: root/tests/test_async.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_async.py')
-rwxr-xr-xtests/test_async.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/test_async.py b/tests/test_async.py
index d40b9c3..e0bca7d 100755
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -29,7 +29,6 @@ import psycopg2
from psycopg2 import extensions
import time
-import select
import StringIO
from testutils import ConnectingTestCase
@@ -66,21 +65,6 @@ class AsyncTests(ConnectingTestCase):
)''')
self.wait(curs)
- def wait(self, cur_or_conn):
- pollable = cur_or_conn
- if not hasattr(pollable, 'poll'):
- pollable = cur_or_conn.connection
- while True:
- state = pollable.poll()
- if state == psycopg2.extensions.POLL_OK:
- break
- elif state == psycopg2.extensions.POLL_READ:
- select.select([pollable], [], [], 10)
- elif state == psycopg2.extensions.POLL_WRITE:
- select.select([], [pollable], [], 10)
- else:
- raise Exception("Unexpected result from poll: %r", state)
-
def test_connection_setup(self):
cur = self.conn.cursor()
sync_cur = self.sync_conn.cursor()