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.

Files for eqassertions, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size eqassertions-0.3-py3-none-any.whl (2.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size eqassertions-0.3.tar.gz (1.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page