-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathruntests.py
More file actions
33 lines (27 loc) · 854 Bytes
/
runtests.py
File metadata and controls
33 lines (27 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
import unittest2
from pycovenantsql._compat import PYPY, JYTHON, IRONPYTHON
import pycovenantsql
pycovenantsql.connections.DEBUG = True
pycovenantsql.connections.VERBOSE = False
#pymysql._auth.DEBUG = True
if not (PYPY or JYTHON or IRONPYTHON):
import atexit
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
@atexit.register
def report_uncollectable():
import gc
if not gc.garbage:
print("No garbages!")
return
print('uncollectable objects')
for obj in gc.garbage:
print(obj)
if hasattr(obj, '__dict__'):
print(obj.__dict__)
for ref in gc.get_referrers(obj):
print("referrer:", ref)
print('---')
import pycovenantsql.tests
unittest2.main(pycovenantsql.tests, verbosity=2)