X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2F__init__.py;h=8c0de9ea2f6d87a5d22eddd9ebbeb414d3a19553;hb=0274de467062ab29d2a41d2a91ec0b28fcd95c8d;hp=2188fa60d44401d1293a6e178ba4d7c1225ddda1;hpb=cb34e104961ce1da242017a0e5ebf60c3fe18a1d;p=dunshire.git diff --git a/test/__init__.py b/test/__init__.py index 2188fa6..8c0de9e 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -18,17 +18,26 @@ from test import matrices_test from test import randomgen from test import symmetric_linear_game_test -def build_suite(): +def build_suite(doctests=True): """ Build our test suite, separately from running it. + + Parameters + ---------- + + doctests : bool + Do you want to build the doctests, too? During random testing, + the answer may be "no." + """ suite = TestSuite() - suite.addTest(DocTestSuite(cones)) - suite.addTest(DocTestSuite(errors, optionflags=ELLIPSIS)) - suite.addTest(DocTestSuite(games, optionflags=ELLIPSIS)) - suite.addTest(DocTestSuite(matrices, optionflags=ELLIPSIS))) - suite.addTest(DocTestSuite(symmetric_linear_game_test)) - suite.addTest(DocTestSuite(randomgen)) + if doctests: + suite.addTest(DocTestSuite(cones)) + suite.addTest(DocTestSuite(errors, optionflags=ELLIPSIS)) + suite.addTest(DocTestSuite(games, optionflags=ELLIPSIS)) + suite.addTest(DocTestSuite(matrices, optionflags=ELLIPSIS)) + suite.addTest(DocTestSuite(symmetric_linear_game_test)) + suite.addTest(DocTestSuite(randomgen, optionflags=ELLIPSIS)) slg_tests = TestLoader().loadTestsFromModule(symmetric_linear_game_test) suite.addTest(slg_tests) mat_tests = TestLoader().loadTestsFromModule(matrices_test) @@ -37,8 +46,8 @@ def build_suite(): def run_suite(suite): """ - Run all of the unit and doctests for the ``dunshire`` and ``test`` - packages. + Run all of the unit and doctests for the :mod:`dunshire` and + :mod:`test` packages. """ runner = TextTestRunner(verbosity=1) return runner.run(suite)