Skip to content

Commit 3c5c225

Browse files
author
James William Pye
committed
Use pg_tmp.
It's not how we would like to do it, but it works.
1 parent d758ba0 commit 3c5c225

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

postgresql/test/test_dbapi20.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
##
2-
# postgresql.driver.dbapi20
2+
# .test.test_dbapi20 - test .driver.dbapi20
33
##
44
import unittest
5-
from ..unittest import TestCaseWithCluster
65
import time
7-
from ..python.contextlib import NoCM
6+
from ..temporal import pg_tmp
87

98
##
10-
# Various Adjustments for pg.driver.dbapi20
9+
# Various Adjustments for .driver.dbapi20
1110
#
1211
# Log: dbapi20.py
1312
# Revision 1.10 2003/10/09 03:14:14 zenzen
@@ -51,7 +50,7 @@
5150
# nothing
5251
# - Fix bugs in test_setoutputsize_basic and test_setinputsizes
5352
#
54-
class test_dbapi20(TestCaseWithCluster):
53+
class test_dbapi20(unittest.TestCase):
5554
"""
5655
Test a database self.driver for DB API 2.0 compatibility.
5756
This implementation tests Gadfly, but the TestCase
@@ -109,15 +108,11 @@ def tearDown(self):
109108
finally:
110109
con.close()
111110

112-
def connection(self):
113-
return NoCM
114-
115111
def _connect(self):
116-
host, port = self.cluster.address()
112+
pg_tmp.init()
113+
host, port = pg_tmp.cluster.address()
117114
return self.driver.connect(
118-
user = 'test',
119-
host = host,
120-
port = port,
115+
user = 'test', host = host, port = port,
121116
)
122117

123118
def test_connect(self):

0 commit comments

Comments
 (0)