Skip to content

Commit 679b51b

Browse files
Strengthen the pytest configuration
1. Sets the collected log level to display for test fails 2. Raises an error if xfailed test passed 3. Fails on unknown pytest config option being passed 4. Fails on unknown test marker being used 5. Add a test skip/failure/error summary return
1 parent 42c8f20 commit 679b51b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pyproject.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,18 @@ write_to = "src/roman_datamodels/_version.py"
5959
where = ["src"]
6060

6161
[tool.pytest.ini_options]
62-
minversion = 4.6
62+
minversion = 6
6363
doctest_plus = true
6464
doctest_rst = true
6565
text_file_format = "rst"
66+
log_cli_level = "INFO"
67+
xfail_strict = true
6668
addopts = [
67-
"--color=yes",
68-
"--doctest-rst",
69+
"--color=yes", # color test output
70+
"--doctest-rst", # enable doctests
71+
"--strict-config", # fail on unknown config options
72+
"--strict-markers", # fail on unknown markers
73+
"-ra", # Show summary of all failures/errors
6974
]
7075
testpaths = ["tests"]
7176
filterwarnings = [

0 commit comments

Comments
 (0)