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 details)
Built Distribution
File details
Details for the file eqassertions-0.2.tar.gz
.
File metadata
- Download URL: eqassertions-0.2.tar.gz
- Upload date:
- Size: 1.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b79613df13c2a6f4405a8a28ce3754efe9d0d431382e4458884a64c2721c4e5 |
|
MD5 | 3d76202bbbd3f7230194887e6a1b3120 |
|
BLAKE2b-256 | 549f4de78bf352ed110988dd17590cb54dd3f595bf752addcfcbb1fb255255ac |
File details
Details for the file eqassertions-0.2-py3-none-any.whl
.
File metadata
- Download URL: eqassertions-0.2-py3-none-any.whl
- Upload date:
- Size: 1.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f880a06d25b7d7d11abcdeb852a419af9d6af4591d4301edf12a46345c25fb56 |
|
MD5 | 5f7bec276dbd3f7275ec31b0cd760981 |
|
BLAKE2b-256 | e93e1fe736b617a1e450aa09cef48de812bd66c22d57d5c2c3acfb9ae03efae6 |