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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file eqassertions-0.4.tar.gz.

File metadata

  • Download URL: eqassertions-0.4.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for eqassertions-0.4.tar.gz
Algorithm Hash digest
SHA256 614f50a2aca930ab733d78a5a489e856eccb325897aa632d3348763732a473a5
MD5 6a527e89d32c00546e18eaa698909459
BLAKE2b-256 7fdc3624632b2e5b251db8ec653790baf311f59305953e9b94017b05ce31d627

See more details on using hashes here.

File details

Details for the file eqassertions-0.4-py3-none-any.whl.

File metadata

  • Download URL: eqassertions-0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for eqassertions-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3bfdefffc49a229a54aab6be56016558ed33d9059e521b1dcc7e4de900cdd98d
MD5 edffb9a9c340c11669c224fe52bcb8b4
BLAKE2b-256 925f36fc4da0e74e2c67eca68a6ccbb7c4de7bfc36ed2a8f132e7298821cef9f

See more details on using hashes here.

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