Overview
Dessert is a utility library enabling Python code to introspect assertions raised via the assert statement.
It is a standalone version of the introspection code from pytest, and all credit is due to Holger Krekel and the pytest developers for this code.
Usage
Using dessert is fairly simple:
>>> with open(tmp_filename, "w") as f:
... _ = f.write("""
... def func():
... def x():
... return 1
... def y():
... return -1
... assert y() == x()
... """)
>>> import emport
>>> import dessert
>>> with dessert.rewrite_assertions_context():
... module = emport.import_file(tmp_filename)
>>> module.func() # doctest: +IGNORE_EXCEPTION_DETAIL +ELLIPSIS
Traceback (most recent call last):
...
assert y() == x()
AssertionError: assert -1 == 1
+ where -1 = <function y at ...>()
+ and 1 = <function x at ...>()
Licence
Dessert is released under the MIT license. It is 99% based on pytest, which is released under the MIT license.
Metadata
Release files for dessert 1.6.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 | Provenance | Actions |
|---|---|---|---|---|
| dessert-1.6.3.tar.gz | 23.9 kB | With provenance | Details for dessert-1.6.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dessert-1.6.3-py3-none-any.whl | Python 3 | none | any | Details for dessert-1.6.3-py3-none-any.whl |
Total release size: 45.2 kB
Release files / dessert-1.6.3.tar.gz
| Download URL | dessert-1.6.3.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3113bd5bca112e99a968dcf74afe8841c4e370a936ebeec61b8d9dfb91b8ef6
|
|
BLAKE2b-256 checksum How to use checksums |
ea58d3e1f91d91e180b567c4cb9bf5a1208c1432b85a9abd8a8de91cae52633c
|
| 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 Nov 24, 2025.
Transparency logRelease files / dessert-1.6.3-py3-none-any.whl
| Download URL | dessert-1.6.3-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
512a32e3f19235a117c49ccf27b86f49a90a527320e4ba7fa99f23de45307151
|
|
BLAKE2b-256 checksum How to use checksums |
6fd4d9476deed63bd421976ea5466a00c7ee0dbf342ea7283a3357fa08c620b0
|
| 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 Nov 24, 2025.
Transparency logSecurity for dessert 1.6.3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dessert-1.6.3.tar.gz
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 Nov 24, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.