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 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