1
1
mirror of https://github.com/psycopg/psycopg2.git synced 2025-02-26 21:50:36 +03:00
psycopg2/sandbox/test_notices.py
2009-04-19 16:25:49 +02:00

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()