From b8874a4b98279d8f5902e4f97dce55c67012371e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 9 Oct 2016 22:03:44 -0400 Subject: [PATCH] Load unit tests from symmetric_linear_game in the test suite. --- test/suite.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) 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) -- 2.44.2