tobiko/tobiko/tests
Federico Ressi b303fa415e Run nested test cases as sub-tests
Allow to run all test cases in a folder that is on the PYTHONPATH.
The function tobiko.run.run_tests will perform below operations:
 - recursively look for all python modules matching 'test_*.py'
   in a given directory
 - create a TestSuite out of all subclasses of unittest.TestCase
   found on discovered modules
 - run the test suite, recording the result in on a TestResult class
   instance
 - eventually (if check parameter is not False as by default) it also
   forward test errors and failures to the test case that called it

Example of use:
  import unittest
  from tobiko import run

  class MyFaultsTest(unittest.TestCase):

    def run(result):
      result_before = run_tests('tobiko/tests/sanity')
      try:
        super().run(result)
      finally:
        result_after = run_tests('tobiko/tests/sanity')
        # ... eventually compare errors and failures between
        # result_before and result_after

    def test_some_failure(self):
      ...

Change-Id: I22b14a40ed6b02d62e486e138f6d0172bbc9f92c
2022-07-27 10:14:37 +00:00
..
faults Fix Octavia fault tests timeouts when SSH 2022-06-15 17:39:39 +00:00
functional Run nested test cases as sub-tests 2022-07-27 10:14:37 +00:00
sanity Fix ContainersHealthTest sanity tests in OSP17 2022-07-07 16:30:48 +02:00
scenario Fix router namespace test 2022-07-17 13:59:05 +03:00
unit Run nested test cases as sub-tests 2022-07-27 10:14:37 +00:00
__init__.py Remove copyrigth notices from empty __init__.py files 2018-11-27 09:45:36 +01:00
base.py Split tox environments requirements files 2018-12-05 08:28:32 +01:00
conftest.py Run nested test cases as sub-tests 2022-07-27 10:14:37 +00:00