BlogDocs

[WIP] Fixes for pytest-8 failures related to warnings(#9040)

Merging
mgorny:pytest-8-warnings
into
main
0%
IMPROVEMENTS
0
REGRESSIONS
0
UNTOUCHED
10
NEW
0
DROPPED
0
IGNORED
0

Benchmarks

test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_generics.py::test_fastapi_startup_perf
0%
3.6 s
3.6 s
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_simple.py::test_fastapi_startup_perf
0%
1.3 s
1.3 s
test_north_star_dump_json
tests/benchmarks/test_north_star.py::test_north_star_dump_json
0%
194.6 ms
194.5 ms
test_north_star_dump_python
tests/benchmarks/test_north_star.py::test_north_star_dump_python
0%
78 ms
78 ms
test_north_star_json_dumps
tests/benchmarks/test_north_star.py::test_north_star_json_dumps
0%
182.2 ms
181.9 ms
test_north_star_json_loads
tests/benchmarks/test_north_star.py::test_north_star_json_loads
+1%
98.5 ms
97.4 ms
test_north_star_validate_json
tests/benchmarks/test_north_star.py::test_north_star_validate_json
0%
298.2 ms
298 ms
test_north_star_validate_json_strict
tests/benchmarks/test_north_star.py::test_north_star_validate_json_strict
-3%
293.1 ms
300.8 ms
test_north_star_validate_python
tests/benchmarks/test_north_star.py::test_north_star_validate_python
0%
169.2 ms
169.2 ms
test_north_star_validate_python_strict
tests/benchmarks/test_north_star.py::test_north_star_validate_python_strict
0%
111.5 ms
111.7 ms

Commits

Click on a commit to change the comparison range
base
main
26a2f06
0%
Modify parse_raw() and parse_file() not to emit spurious warnings Modify the `parse_raw()` and `parse_file()` to ignore deprecation warnings from their implementation details. The methods themselves are deprecated, and that should be the only deprecation warning interesting to the user. This also fixes test failures with pytest-8 that no longer ignores warnings that did not match `pytest.warns()`.
1497490
2 months ago by mgorny
0%
Fix test_json_schema double warning failure with pytest-8 Add a warning filter to test_json_schema to resolve the test failure with pytest-8. The test currently uses parametrization to assert for a single call emitting two separate warnings, since `pytest.warns()` used to consume all non-matched warnings before. However, with pytest-8 it reemits the remaining warnings and therefore causes test to fail due to the `error` filter. When pydantic requires pytest >= 8, we can instead switch to using two `pytest.warns()`.
748e90e
2 months ago by mgorny
ResourcesHomePricingDocsBlogGitHub
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.