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
13 from dunshire
import cones
14 from dunshire
import errors
15 from dunshire
import matrices
16 from dunshire
import games
17 from test
import symmetric_linear_game_test
21 Build our test suite, separately from running it.
24 suite
.addTest(DocTestSuite(cones
))
25 suite
.addTest(DocTestSuite(errors
))
26 suite
.addTest(DocTestSuite(matrices
))
27 suite
.addTest(DocTestSuite(games
))
28 suite
.addTest(DocTestSuite(symmetric_linear_game_test
))
29 slg_tests
= TestLoader().loadTestsFromModule(symmetric_linear_game_test
)
30 suite
.addTest(slg_tests
)
35 Run all of the unit and doctests for the ``dunshire`` and ``test``
38 runner
= TextTestRunner(verbosity
=1)
39 return runner
.run(suite
)