full_match
When catching exceptions in Pytest, sometimes you need to check messages. Since the user sends a pattern for searching, and not a message for exact matching, sometimes similar, but not identical messages pass through the filter. This micro-library contains a function that makes Pytest check exception messages accurately.
It may also be useful to you if you use mutation testing tools such as mutmut.
Install it:
pip install full_match
And use:
import pytest
from full_match import match
def test_something():
with pytest.raises(AssertionError, match='Regex pattern did not match.'):
with pytest.raises(ValueError, match=match('Some message.')):
raise ValueError('XXSome message.XX')
The message in the inner with block does not match the pattern exactly, so an AssertionError exception will occur in this example.
Metadata
Release files for full-match 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| full_match-0.0.3.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| full_match-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / full_match-0.0.3.tar.gz
| Download URL | full_match-0.0.3.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32cfbeba50ef0f1625eba63869e59a0971c8570f2a30b0f38d7e1939fb945f2e
|
|
BLAKE2b-256 checksum How to use checksums |
e8a5a7804626e4a2d9fb04a3a98264c329c1ea88f12324b724b303183ed4534f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2025.
Transparency logRelease files / full_match-0.0.3-py3-none-any.whl
| Download URL | full_match-0.0.3-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7ab0187d7ec8b2839f0359d413267599fe5aa7c2c8a980c4072842d0d708e94
|
|
BLAKE2b-256 checksum How to use checksums |
dbce55b6b3c0acaca3399c56e55273515089f904a5fe598e214e7bf56fe61f70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2025.
Transparency log