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.4.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for eqassertions-0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bfdefffc49a229a54aab6be56016558ed33d9059e521b1dcc7e4de900cdd98d |
|
MD5 | edffb9a9c340c11669c224fe52bcb8b4 |
|
BLAKE2b-256 | 925f36fc4da0e74e2c67eca68a6ccbb7c4de7bfc36ed2a8f132e7298821cef9f |