Skip to main content

Pattern matching helper classes designed to be similar to Jest expect matchers, but modified to suit a Pythonic style of programming.

Project description

Jestspectation

Pattern matching helper classes designed to be similar to Jest's expect matchers, but modified to suit a Pythonic style of programming.

Basic Usage

import jestspectation as expect
assert {
    "a": 1,
    "b": 2,
    "c": 3,
} == {
    "a": 1,
    "b": expect.Any(int),
    "c": expect.FloatApprox(2.5, magnitude=0.5)
}

Installation

pip install jestspectation

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

Jestspectation-0.2.0.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

Jestspectation-0.2.0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

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