add_unittests(testsuite, module_name)[source]

Function to add all available unittests of the module with given name (e.g. “obspy.core”) to the given unittest TestSuite. All submodules in the “tests” directory whose names are starting with test_ are added.

  • testsuite (unittest.TestSuite) testsuite to which the tests should be added
  • module_name (str) name of the module of which the tests should be added


>>> import unittest
>>> suite = unittest.TestSuite()
>>> add_unittests(suite, "obspy.core")