]> gitweb.michael.orlitzky.com - dunshire.git/commitdiff
Add a most basic test suite runner (for doctests only, at the moment).
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 5 Oct 2016 14:48:16 +0000 (10:48 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 5 Oct 2016 14:48:16 +0000 (10:48 -0400)
makefile
test/suite.py [new file with mode: 0644]

index ca681470d68f08f9f9ef2c62a27c7b503b4c69d7..f1be9f05c3fd786b693f29a1091baf677c8b4c4f 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,3 +1,7 @@
+.PHONY: check
+check:
+       python test/suite.py
+
 .PHONY: clean
 clean:
        rm -r __pycache__
diff --git a/test/suite.py b/test/suite.py
new file mode 100644 (file)
index 0000000..e66d3ad
--- /dev/null
@@ -0,0 +1,17 @@
+import unittest
+import doctest
+
+# Add '../' to our path.
+from site import addsitedir
+addsitedir('.')
+import cones
+import matrices
+import symmetric_linear_game
+
+suite = unittest.TestSuite()
+suite.addTest(doctest.DocTestSuite(cones))
+suite.addTest(doctest.DocTestSuite(matrices))
+suite.addTest(doctest.DocTestSuite(symmetric_linear_game))
+
+runner = unittest.TextTestRunner(verbosity=2)
+runner.run(suite)