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.2.tar.gz
(1.2 kB
view hashes)
Built Distribution
Close
Hashes for eqassertions-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f880a06d25b7d7d11abcdeb852a419af9d6af4591d4301edf12a46345c25fb56 |
|
MD5 | 5f7bec276dbd3f7275ec31b0cd760981 |
|
BLAKE2b-256 | e93e1fe736b617a1e450aa09cef48de812bd66c22d57d5c2c3acfb9ae03efae6 |