From ad2119aaa3a08896a94c0ae0ad5c12a3af96197a Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Thu, 12 Aug 2021 14:39:29 -0700 Subject: [PATCH] Tell pytest not to match classes/functions starting with "test" I run tests with setup.py or with the unittest module, but Fedora uses pytest. pytest assumes that any class or function starting with "test" is a test case, which is not always the case (e.g., drgn.helpers.linux.bitops.test_bit()). We've hit this at least twice, in #94 and #112. All of our tests are unittest.TestCase cases, so we can tell pytest to not match anything else. I'm using pytest.ini instead of pyproject.toml because pytest only started supporting the latter relatively recently. Closes #112. Signed-off-by: Omar Sandoval --- pytest.ini | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..976c8482 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +python_classes = +python_functions =