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
This reverts commit 7550237e7355c74ffae470d235a22a9fb8a9048d.
Reason for revert: test_url is failing due a problem with CirrOS image URL
Change-Id: I8113e36920ba4478a3335aa300f10db6b3eeb1af
- allow to use fedora 35 as base image
- make base image configurable
- update docker compose file
- fix python code to satisfy linters with Python 3.10
- add linters, lower-constraints and fedora jobs
Change-Id: I1a786191d2529fe1d14a47f06f76405490bfb11c