tobiko/zuul.d
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
..
docker.yaml Run nested test cases as sub-tests 2022-07-27 10:14:37 +00:00
infrared.yaml Update Infrared jobs 2022-07-21 16:21:56 +00:00
project.yaml Update OpenStack jobs 2022-07-21 16:22:12 +00:00
tripleo.yaml Use nesterd virtualization nodes for tripleo-ci jobs 2022-03-23 21:27:49 +00:00