assertions in __eq__methods
Project description
assertions in __eq__ methods.
>>> from eqassertions import Any, NotNone, IsA, IsTrue, Match >>> data = {"a": 1, "b": 2} >>> assert {"a": 1, "b": Any()} >>> assert {"a": 1, "b": NotNone()} >>> assert {"a": 1, "b": IsA(int)} >>> assert {"a": 1, "b": IsTrue()} >>> assert v == {"a": 1, "b": Match(r"\d")} >>> assert v == {"a": 1, "b": Match(r"[a-z]")} Traceback (most recent call last): ... AssertionError
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eqassertions-0.3.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for eqassertions-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62dfb357c95fd5bcfe5ee0fe9e317745bbef5d7a2e270c07af72cde3eb543107 |
|
MD5 | 16dfadf970b3737daed92ccfed375144 |
|
BLAKE2b-256 | 1c93ced25038bc42f9535986546fd2ebc5dfff1935326d5e2562cb7600d7810b |