Releases: okken/pytest-check
Releases · okken/pytest-check
2.8.0
- Support Request #122: Feature proposal: Capability to mark checks as xfail
- Allow check helper functions, including
raises(), to accept anxfailreason. A failing check can now produce an xfailed test result, while a passing check does not produce xpass unless the test is already marked with@pytest.mark.xfail. - (docs) Document
xfailsupport for check helper functions in the README.
2.7.7
2.7.6
2.7.5
Changed
- Passing
Noneto comparison functions likegreater(),less(), etc. used to raise an exception, which caused a test failure and stopped the test.- That's unexpected with a check function.
- So now the check fails with a meaningful error message and continues with the rest of the test.
- (typing) Allow numpy floats with comparison functions to pass mypy.
2.7.4
2.7.3
Added
- Add
__init__.pyistub file for IDE intellisense (e.g. VSCode) and static type checkers. - Add PEP 561
py.typedmarker so the package is recognized as typed. - (examples) Add
test_example_import_as.pyto validateimport pytest_check as checkwith mypy.
Fixed
- Ignore dist-packages in pseudo stack trace - Fixes #196 - Thanks @siferati
- (typing) Resolve remaining mypy errors for
import pytest_check as checkusage; internal adjustments incheck_functions.py.
Changed
- (ci) Rename "quality" job to "static-analysis"; split into separate jobs for static-analysis, pytest_earliest, and coverage; use Python 3.14 for quality jobs.
- (tox) Add mypy env coverage for import-as style in examples.
2.7.2
Fixed
- #184: Fix issues with mypy. The example in this issue now passes mypy. Also mypy is now being tested as part of tox.
- (typing) Allow dynamic helper access on
CheckContextManagerfor static analysis, so patterns likecheck.equal(...)type-check in fixture-annotated tests.
Changed
- (typing) Update internal
_Comparable*protocol comparison signatures to satisfy strict mypy checks. - (tox) Enable and expand
mypyenv checks to includeexamples/. - (tox) Install
httpxin themypyenv so example type checking works without import ignores. - (examples) Switch decorator usage in
test_example_check_func_decorator.pyto importcheck_funcdirectly for static type checking. - (examples) Add
test_example_context_manager_type.pyto document and validate context-manager fixture typing behavior. - (ci) Add a GitHub Actions quality job to run
tox -e lint,mypy,pytest_earliest,coverage.
2.7.1
Added
- (docs) Document custom message support (
msg) incheck.raises(). - (tests) Add tests for custom messages in
check.raises(). - (docs) Document that built-in check methods return
boolvalues. - (docs) Update pseudo-traceback examples to reflect the default single pseudo-traceback and show how to increase it with
--check-max-tb=5. - (docs) Add
check.call_on_fail()section with usage guidance. - (examples) Add runnable logging example in
examples/logging_to_a_file/.
Fixed
- (tests) Make
test_raises_custom_msgcompatible with pytest < 7.3 short-summary output.
2.7.0
Added
- Support for
raisesparameter in@pytest.mark.xfailwhen using check context managers - Fixes #145 - Thanks @shairoth12
Fixed
Changed
- Internal: add fixture run_example_test in tests - Thanks @even-even
- Update
__all__to include 'check' in pytest_check module - Fixes #190 - Thanks @taylermulligan
2.6.0
raisesreturns the exception value, so the excpected error message can be verified. - Thanks @shairoth12