Skip to content

Commit

Permalink
Re-add make_suite() that was accidentally removed
Browse files Browse the repository at this point in the history
  • Loading branch information
wbond committed Aug 23, 2023
1 parent d845bb7 commit 3f8655c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,23 @@ def _import_from(mod, path, mod_dir=None):
return None


def make_suite():
"""
Constructs a unittest.TestSuite() of all tests for the package. For use
with setuptools.
:return:
A unittest.TestSuite() object
"""

loader = unittest.TestLoader()
suite = unittest.TestSuite()
for test_class in test_classes():
tests = loader.loadTestsFromTestCase(test_class)
suite.addTests(tests)
return suite


def test_classes():
"""
Returns a list of unittest.TestCase classes for the package
Expand Down

0 comments on commit 3f8655c

Please sign in to comment.