Skip to main content

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):

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)

Uploaded source

Built Distribution

eqassertions-0.4-py3-none-any.whl (3.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page