terminator/tests/test_doctests.py
bryce 0f201ade0f tests: Make tests easier to run at a package level
Add a run_tests script.  Move tests subdir to top level.  Force
terminatorlib into path for tests.

As of this commit, all tests pass:

  ~/src/Terminator/terminator$ ./run_tests 
  tests/testborg.py

  tests/test_doctests.py

  tests/testsignalman.py
  0/14 tests failed
2015-06-22 15:39:42 -07:00

23 lines
508 B
Python

"""Load up the tests."""
import os
import sys, os.path
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), "..")))
from unittest import TestSuite
from doctest import DocTestSuite, ELLIPSIS
def test_suite():
suite = TestSuite()
for name in (
'config',
'plugin',
'cwd',
'factory',
'util',
'tests.testborg',
'tests.testsignalman',
):
suite.addTest(DocTestSuite('terminatorlib.' + name))
return suite