4 This module compiles the doctests and unittests from the rest of the
5 codebase into one big TestSuite() and the runs it. It also provides a
6 function :func:`build_suite` that merely builds the suite; the result
7 can be used by setuptools.
10 from unittest
import TestLoader
, TestSuite
, TextTestRunner
11 from doctest
import DocTestSuite
, ELLIPSIS
13 from dunshire
import cones
14 from dunshire
import errors
15 from dunshire
import matrices
16 from dunshire
import games
17 from test
import matrices_test
18 from test
import randomgen
19 from test
import symmetric_linear_game_test
23 Build our test suite, separately from running it.
26 suite
.addTest(DocTestSuite(cones
))
27 suite
.addTest(DocTestSuite(errors
, optionflags
=ELLIPSIS
))
28 suite
.addTest(DocTestSuite(games
, optionflags
=ELLIPSIS
))
29 suite
.addTest(DocTestSuite(matrices
, optionflags
=ELLIPSIS
))
30 suite
.addTest(DocTestSuite(symmetric_linear_game_test
))
31 suite
.addTest(DocTestSuite(randomgen
))
32 slg_tests
= TestLoader().loadTestsFromModule(symmetric_linear_game_test
)
33 suite
.addTest(slg_tests
)
34 mat_tests
= TestLoader().loadTestsFromModule(matrices_test
)
35 suite
.addTest(mat_tests
)
40 Run all of the unit and doctests for the ``dunshire`` and ``test``
43 runner
= TextTestRunner(verbosity
=1)
44 return runner
.run(suite
)