17 |
import unittest |
import unittest |
18 |
import traceback |
import traceback |
19 |
|
|
20 |
|
import postgissupport |
21 |
|
|
22 |
|
|
23 |
def thuban_dir(): |
def thuban_dir(): |
24 |
"""Return the directory containing the Thuban package""" |
"""Return the directory containing the Thuban package""" |
25 |
thisdir = os.path.dirname(__file__) |
thisdir = os.path.dirname(__file__) |
123 |
|
|
124 |
def runTests(self): |
def runTests(self): |
125 |
"""Extend inherited method so that we use a ThubanTestRunner""" |
"""Extend inherited method so that we use a ThubanTestRunner""" |
|
print "ThubanTestProgram.runTests" |
|
126 |
self.testRunner = ThubanTestRunner(verbosity = self.verbosity) |
self.testRunner = ThubanTestRunner(verbosity = self.verbosity) |
127 |
unittest.TestProgram.runTests(self) |
unittest.TestProgram.runTests(self) |
128 |
|
|
150 |
# ends with a sys.exit to make sure that the process exits with |
# ends with a sys.exit to make sure that the process exits with |
151 |
# an appropriate exit code |
# an appropriate exit code |
152 |
|
|
153 |
|
# Shutdown the postgis server if it's running |
154 |
|
try: |
155 |
|
postgissupport.shutdown_test_server() |
156 |
|
except: |
157 |
|
traceback.print_exc() |
158 |
|
|
159 |
# Print additional information |
# Print additional information |
160 |
print_additional_summary() |
print_additional_summary() |
161 |
|
|
180 |
Run the garbage collector and print uncollected objects. Also print |
Run the garbage collector and print uncollected objects. Also print |
181 |
any un-unsubscribed messages. |
any un-unsubscribed messages. |
182 |
""" |
""" |
183 |
|
# this function may be called indirectly from test cases that test |
184 |
|
# test support modules which do not use anything from thuban itself, |
185 |
|
# so we call initthuban so that we can import the connector module |
186 |
|
initthuban() |
187 |
import gc, Thuban.Lib.connector |
import gc, Thuban.Lib.connector |
188 |
gc.collect() |
gc.collect() |
189 |
if gc.garbage: |
if gc.garbage: |