os-testr is a Python library that acts as a wrapper for the `testr` (now often `stestr`) test runner, specifically providing additional functionality and integrations tailored for OpenStack projects. It enables features like `subunit-trace` for output filtering, `subunit2html` for HTML test reports, and `generate-subunit` for single test streams. The current version is 3.0.0, and its major release cadence is infrequent, typically aligning with broader OpenStack development cycles.
pip install os-testrVerified import paths — ran on the pinned version, not inferred.
os-testr is commonly invoked from the command line, often within `tox.ini` or project-specific `run_tests.sh` scripts in OpenStack environments. The primary executable is `ostestr`.
Check your test paths, `PYTHONPATH`, and ensure all test dependencies are correctly installed and importable. Run a single, simple test to isolate import issues.
For debugging, explicitly use `testtools.run` with a generated test list. First, generate a list of tests (e.g., using `testr list-tests > my-list`), then run `testtools.run my-list` with your `pdb.set_trace()` in place.