summaryrefslogtreecommitdiff
path: root/unittests/__init__.py
AgeCommit message (Collapse)Author
2025-07-22unittests: allow running with pytest/unittest directlyChristoph Reiter
Currently the unittests are not runnable with pytest or unittest without going through the run_unittests.py wrapper, or setting certain env vars like MESON_UNIT_TEST_BACKEND. This has that downside that the common "pytest ..." fails and integration with things like VSCode fails too. To work around that we set everything that is needed to run the tests in __init__.py and run_unittests is only one more variant to invoke them by providing different defaults and settings. To make sure that pytest/unittest discover and run_unittests don't diverge implement an automatic test discovery in run_unittests to avoid hardcoding the tests to run there. There shouldn't be any functional changes.
2023-08-18tests: fix assertion rewriting when pytest is usedBenoit Pierre