pretty_assert
English | 简体中文
Prints pretty, user friendly assert messages.
Features
- Do not print traces that confuse the user
- Add Comment
- Customize colors and other options
assert_eqenhancement 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
- assert2: inspired by
- pytest-icdiff: code reference
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)
| File | Size | Uploaded | |
|---|---|---|---|
| pretty_assert-0.1.1.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pretty_assert-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
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
|