mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Don't check the test db exists at psycopg2.tests import time
This commit is contained in:
parent
2dab7d52f2
commit
bf48706868
|
@ -27,17 +27,6 @@ import sys
|
|||
from testconfig import dsn
|
||||
from testutils import unittest
|
||||
|
||||
# If connection to test db fails, bail out early.
|
||||
import psycopg2
|
||||
try:
|
||||
cnn = psycopg2.connect(dsn)
|
||||
except Exception, e:
|
||||
print "Failed connection to test db:", e.__class__.__name__, e
|
||||
print "Please set env vars 'PSYCOPG2_TESTDB*' to valid values."
|
||||
sys.exit(1)
|
||||
else:
|
||||
cnn.close()
|
||||
|
||||
import bug_gc
|
||||
import bugX000
|
||||
import extras_dictcursor
|
||||
|
@ -57,6 +46,17 @@ import test_green
|
|||
import test_cancel
|
||||
|
||||
def test_suite():
|
||||
# If connection to test db fails, bail out early.
|
||||
import psycopg2
|
||||
try:
|
||||
cnn = psycopg2.connect(dsn)
|
||||
except Exception, e:
|
||||
print "Failed connection to test db:", e.__class__.__name__, e
|
||||
print "Please set env vars 'PSYCOPG2_TESTDB*' to valid values."
|
||||
sys.exit(1)
|
||||
else:
|
||||
cnn.close()
|
||||
|
||||
suite = unittest.TestSuite()
|
||||
suite.addTest(bug_gc.test_suite())
|
||||
suite.addTest(bugX000.test_suite())
|
||||
|
|
Loading…
Reference in New Issue
Block a user