mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 18:33:44 +03:00
13 lines
465 B
Python
13 lines
465 B
Python
|
def test():
|
||
|
import sys, os, thread, psycopg2
|
||
|
def test2():
|
||
|
while True:
|
||
|
for filename in map(lambda m: getattr(m, "__file__", None), sys.modules.values()):
|
||
|
os.stat("/dev/null")
|
||
|
connection = psycopg2.connect(database="test")
|
||
|
cursor = connection.cursor()
|
||
|
thread.start_new_thread(test2, ())
|
||
|
while True:
|
||
|
cursor.execute("COMMIT")
|
||
|
test()
|