Skip to content

Conversation

CyberTailor
Copy link
Contributor

@CyberTailor CyberTailor commented Nov 3, 2024

This test failed with pytest -Wdefault, which distros usually enable for downstream testing to avoid surprise failures.

For example:

$ pytest tests/test_settings.py::test_protected_namespace_defaults -Wdefault

Use proper pytest.warns() method instead of incorrect pytest.raises().

This test failed with "pytest -Wdefault", which distros usually enable
for downstream testing to avoid surprise failures.

Use proper `pytest.warns()` method instead of incorrect
`pytest.raises()`.

See: https://mgorny.pl/articles/downstream-testing-python-packages.html#assuming-werror-catching-warnings-as-exceptions
@hramezani hramezani merged commit b2c979c into pydantic:main Nov 3, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants