blob: 4302dcab233cca53e51f6106274eb91a36bb0791 (
plain)
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
33
34
35
36
|
# -*- coding: ascii -*-
from doctest import DocTestSuite
import unittest, os, os.path, sys
import warnings
# We test the documentation this way instead of using DocFileSuite so
# we can run the tests under Python 2.3
def test_README():
pass
this_dir = os.path.dirname(__file__)
locs = [
os.path.join(this_dir, os.pardir, 'README.txt'),
os.path.join(this_dir, os.pardir, os.pardir, 'README.txt'),
]
for loc in locs:
if os.path.exists(loc):
test_README.__doc__ = open(loc).read()
break
if test_README.__doc__ is None:
raise RuntimeError('README.txt not found')
def test_suite():
"For the Z3 test runner"
return DocTestSuite()
if __name__ == '__main__':
sys.path.insert(0, os.path.abspath(os.path.join(
this_dir, os.pardir, os.pardir
)))
unittest.main(defaultTest='test_suite')
|