# Unittest: Fail if zero tests were discovered

**URL:** <https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498>\
**Category:** Ideas\
**Created:** [November 29, 2022, 12:44am UTC](https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498 "2022-11-29T00:44:46Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![vstinner](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/vstinner/32/15130_2.png) [@vstinner](https://discuss.python.org/u/vstinner)\
**Post date:** [November 30, 2022, 10:13am UTC](https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498/10 "2022-11-30T10:13:45Z")

</div>

Aha, that’s a bug that should be fixed 🙂 Usually, I only use `-m pattern` with a test name, like: `python -m test test_os -m test_access`.

---

_[View the full topic](https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498)._
