From 748dc6a156f01248a461c4465e5b7c964369dbd9 Mon Sep 17 00:00:00 2001 From: prandla Date: Wed, 30 Jul 2025 23:49:02 +0300 Subject: [PATCH] Update pytest config * Move settings into pyproject.toml * Set testpaths to avoid the "please monkey-patch earlier" warning from gevent (caused by pytest importing unnecessary files, including one that imported requests somewhere) --- pyproject.toml | 4 ++++ pytest.ini | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 pytest.ini diff --git a/pyproject.toml b/pyproject.toml index 31ac9ec7bc..24f7b99713 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,3 +74,7 @@ devel = [ [build-system] requires = ["setuptools>=80,<81", "babel==2.12.1"] build-backend = "setuptools.build_meta" + +[tool.pytest.ini_options] +python_files = ["test_*.py", "*_test.py", "*Test.py"] +testpaths = ["cmstestsuite/unit_tests"] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index ef55d7e985..0000000000 --- a/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -python_files = test_*.py *_test.py *Test.py