X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2F__init__.py;h=2e23a7c7dbec733dc994b611e137a33f419d036d;hb=d08e0af9bf86e81d4a5b3dbbe38092bacc5edd62;hp=074b2b13b3a24fe1c94447ce317e9781ac35d517;hpb=5bcb67b592ff12a57f7cb9803305c380342ef71c;p=dunshire.git diff --git a/test/__init__.py b/test/__init__.py index 074b2b1..2e23a7c 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)