Skip to main content

pretty_assert

English | 简体中文

Prints pretty, user friendly assert messages.

ex

Features

  • Do not print traces that confuse the user
  • Add Comment
  • Customize colors and other options
  • assert_eq enhancement with icdiff

Installation

pip install pretty-assert

Usage

from pretty_assert import (
    init,
    assert_,
    assert_eq,
    assert_ge,
    assert_gt,
    assert_in,
    assert_le,
    assert_lt,
    assert_ne,
    assert_not_in,
)
some_bool = True
some_number = 1
assert_(some_bool)  # you can assert without comment
assert_(some_bool, "some_bool is not True")
assert_eq(some_number, 1, "some_number is not 1")
...

For more usage and customization, please check out examples.

Thanks

Metadata

Release files for pretty-assert 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pretty-assert 0.1.1
File Size Uploaded Provenance Actions
pretty_assert-0.1.1.tar.gz 4.5 kB Without provenance Details for pretty_assert-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pretty-assert 0.1.1
File Interpreter ABI Platform Actions
pretty_assert-0.1.1-py3-none-any.whl Python 3 none any Details for pretty_assert-0.1.1-py3-none-any.whl

Total release size: 9.3 kB

Release files / pretty_assert-0.1.1.tar.gz

Download URL pretty_assert-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f320c72591f61777b85defdcb1e7fa00ceb4dfaa456545d68bf533d9bc84d81d
BLAKE2b-256 checksum
How to use checksums
1e8f21e118c3eeaa82ba59757072697ea5536a1312c8b7054d68ae411c81ed42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.2 Windows/11

Release files / pretty_assert-0.1.1-py3-none-any.whl

Download URL pretty_assert-0.1.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
457008a6132edb9df763614ccabede8fe02c4f02c51d536784aa633a15e54ce1
BLAKE2b-256 checksum
How to use checksums
8ad0257574e4f05889ea19fa0293f94712784a7626804ffe390524691e88d0cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.2 Windows/11

Security for pretty-assert 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page