From 613ab60be9e338bf756bc7642b53ef950af298fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Fri, 15 May 2026 09:07:41 +0200 Subject: [PATCH 1/2] move pytest config to pytest.toml --- pytools/pytest.ini | 2 -- test/python_requirements.txt | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 pytools/pytest.ini diff --git a/pytools/pytest.ini b/pytools/pytest.ini deleted file mode 100644 index d1f826516..000000000 --- a/pytools/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -python_files="test_*.py" diff --git a/test/python_requirements.txt b/test/python_requirements.txt index 9cf2383a2..3c053161d 100644 --- a/test/python_requirements.txt +++ b/test/python_requirements.txt @@ -9,6 +9,5 @@ scipy>=1.2.3 # note that no version of inifix supports Python older than 3.6 inifix>=0.11.2 -# To run the test suite, we can use pytest, mostly any version -# 6.0 is the one available on system available on debian-11 -pytest >= 6.0 +# To run the test suite, we can use pytest +pytest>=9.0 From 967b35a45c6b405007228ce73ee4ae3a35a3cecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Fri, 15 May 2026 09:07:31 +0200 Subject: [PATCH 2/2] separate inifiles validation from formatting --- .pre-commit-config.yaml | 4 +++- pytest.ini | 6 ------ pytest.toml | 10 ++++++++++ 3 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 pytest.ini create mode 100644 pytest.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8249b7b03..54c86ed80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,8 +47,10 @@ repos: - repo: https://github.com/neutrinoceros/inifix rev: v6.1.2 hooks: + - id: inifix-validate + args: [--sections=require] - id: inifix-format - files: ^(test/).*\.(ini)$ # want to skip pytest.ini + args: [--skip-validation] - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index b3482664f..000000000 --- a/pytest.ini +++ /dev/null @@ -1,6 +0,0 @@ -[pytest] -markers= - default: Test to run by default. -python_files="test_*.py" -junit_logging="system-out" -junit_log_passing_tests=false diff --git a/pytest.toml b/pytest.toml new file mode 100644 index 000000000..d21bc46a9 --- /dev/null +++ b/pytest.toml @@ -0,0 +1,10 @@ +[pytest] +minversion = "9.0" +markers = [ + "default: Test to run by default.", +] +python_files = [ + "test_*.py", +] +junit_logging = "system-out" +junit_log_passing_tests = false