From: Michael Orlitzky Date: Mon, 10 Oct 2016 02:03:44 +0000 (-0400) Subject: Load unit tests from symmetric_linear_game in the test suite. X-Git-Tag: 0.1.0~183 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=b8874a4b98279d8f5902e4f97dce55c67012371e;p=dunshire.git Load unit tests from symmetric_linear_game in the test suite. --- diff --git a/test/suite.py b/test/suite.py index 22579ca..bfd0011 100644 --- a/test/suite.py +++ b/test/suite.py @@ -1,5 +1,12 @@ -import unittest -import doctest +""" +The whole test suite. + +This module compiles the doctests and unittests from the rest of the +codebase into one big TestSuite() and the runs it. +""" + +from unittest import TestLoader, TestSuite, TextTestRunner +from doctest import DocTestSuite # Add '../' to our path. from site import addsitedir @@ -9,11 +16,11 @@ import errors import matrices import symmetric_linear_game -suite = unittest.TestSuite() -suite.addTest(doctest.DocTestSuite(cones)) -suite.addTest(doctest.DocTestSuite(errors)) -suite.addTest(doctest.DocTestSuite(matrices)) -suite.addTest(doctest.DocTestSuite(symmetric_linear_game)) - -runner = unittest.TextTestRunner(verbosity=2) +suite = TestSuite() +suite.addTest(DocTestSuite(cones)) +suite.addTest(DocTestSuite(errors)) +suite.addTest(DocTestSuite(matrices)) +suite.addTest(DocTestSuite(symmetric_linear_game)) +suite.addTest(TestLoader().loadTestsFromModule(symmetric_linear_game)) +runner = TextTestRunner(verbosity=2) runner.run(suite)