diff options
author | Oleksandr Shulgin <oleksandr.shulgin@zalando.de> | 2015-10-15 18:01:43 +0200 |
---|---|---|
committer | Oleksandr Shulgin <oleksandr.shulgin@zalando.de> | 2015-10-15 18:01:43 +0200 |
commit | cf4f2411bfd2d5a1cb84393f135e48107428137b (patch) | |
tree | fddb342b5802aa76fe70784a753d59726e88eeef /tests/test_async.py | |
parent | d14fea31a33488a1f62a45a8a87109d5be678a72 (diff) | |
download | psycopg2-cf4f2411bfd2d5a1cb84393f135e48107428137b.tar.gz |
Fix async replication and test.
Diffstat (limited to 'tests/test_async.py')
-rwxr-xr-x | tests/test_async.py | 16 |
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() |