Minor tweaks for PEP 8 compliance.
This commit is contained in:
parent
cfa2750854
commit
0633e1017c
@ -66,7 +66,7 @@ connection.commit()
|
|||||||
print("\nDequeuing messages...")
|
print("\nDequeuing messages...")
|
||||||
batch_size = 8
|
batch_size = 8
|
||||||
while True:
|
while True:
|
||||||
messages = queue.deqMany(batch_size)
|
messages = queue.deqmany(batch_size)
|
||||||
if not messages:
|
if not messages:
|
||||||
break
|
break
|
||||||
for props in messages:
|
for props in messages:
|
||||||
|
|||||||
@ -60,8 +60,8 @@ print("--> Protocol:", sub.protocol)
|
|||||||
print("--> Timeout:", sub.timeout)
|
print("--> Timeout:", sub.timeout)
|
||||||
print("--> Operations:", sub.operations)
|
print("--> Operations:", sub.operations)
|
||||||
print("--> Rowids?:", bool(sub.qos & oracledb.SUBSCR_QOS_ROWIDS))
|
print("--> Rowids?:", bool(sub.qos & oracledb.SUBSCR_QOS_ROWIDS))
|
||||||
queryId = sub.registerquery("select * from TestTempTable")
|
query_id = sub.registerquery("select * from TestTempTable")
|
||||||
print("Registered query:", queryId)
|
print("Registered query:", query_id)
|
||||||
|
|
||||||
while registered:
|
while registered:
|
||||||
print("Waiting for notifications....")
|
print("Waiting for notifications....")
|
||||||
|
|||||||
@ -59,8 +59,8 @@ try:
|
|||||||
connection.commit() # this should fail
|
connection.commit() # this should fail
|
||||||
sys.exit("Session was not killed. Terminating.")
|
sys.exit("Session was not killed. Terminating.")
|
||||||
except oracledb.DatabaseError as e:
|
except oracledb.DatabaseError as e:
|
||||||
errorObj, = e.args
|
error_obj, = e.args
|
||||||
if not errorObj.isrecoverable:
|
if not error_obj.isrecoverable:
|
||||||
sys.exit("Session is not recoverable. Terminating.")
|
sys.exit("Session is not recoverable. Terminating.")
|
||||||
ltxid = connection.ltxid
|
ltxid = connection.ltxid
|
||||||
if not ltxid:
|
if not ltxid:
|
||||||
|
|||||||
@ -11,10 +11,10 @@
|
|||||||
2400 - Module for testing session pools
|
2400 - Module for testing session pools
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import test_env
|
import threading
|
||||||
|
|
||||||
import cx_Oracle as oracledb
|
import cx_Oracle as oracledb
|
||||||
import threading
|
import test_env
|
||||||
|
|
||||||
class TestCase(test_env.BaseTestCase):
|
class TestCase(test_env.BaseTestCase):
|
||||||
require_connection = False
|
require_connection = False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user