Skip to main content

h-matchers

Test objects which pass equality checks with other objects

Usage

from h_matchers import Any
import re

assert [1, ValueError(), print] == [
        Any(),
        Any.instance_of(ValueError),
        Any.function()
    ]

assert ["easy", "string", "matching"] == [
        Any.string(),
        Any.string.containing("in"),
        Any.string.matching('^.*CHING!', re.IGNORECASE)
    ]

Hacking

Installing h-matchers in a development environment

You will need

  • Git

  • pyenv Follow the instructions in the pyenv README to install it. The Homebrew method works best on macOS. On Ubuntu follow the Basic GitHub Checkout method.

Clone the git repo

git clone https://github.com/hypothesis/h-matchers.git

This will download the code into a h-matchers directory in your current working directory. You need to be in the h-matchers directory for the rest of the installation process:

cd h-matchers

Run the tests

make test

That's it! You’ve finished setting up your h-matchers development environment. Run make help to see all the commands that're available for linting, code formatting, packaging, etc.

Updating the Cookiecutter scaffolding

This project was created from the https://github.com/hypothesis/h-cookiecutter-pypackage/ template. If h-cookiecutter-pypackage itself has changed since this project was created, and you want to update this project with the latest changes, you can "replay" the cookiecutter over this project. Run:

make template

This will change the files in your working tree, applying the latest updates from the h-cookiecutter-pypackage template. Inspect and test the changes, do any fixups that are needed, and then commit them to git and send a pull request.

If you want make template to skip certain files, never changing them, add these files to "options.disable_replay" in .cookiecutter.json and commit that to git.

If you want make template to update a file that's listed in disable_replay simply delete that file and then run make template, it'll recreate the file for you.

Metadata

Release files for h-matchers 1.0.20191025.185835

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for h-matchers 1.0.20191025.185835
File Size Uploaded Provenance
h_matchers-1.0.20191025.185835.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for h-matchers 1.0.20191025.185835
File Interpreter ABI Platform
h_matchers-1.0.20191025.185835-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / h_matchers-1.0.20191025.185835.tar.gz

Download URL h_matchers-1.0.20191025.185835.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
244384ec7e5b2707d76b57949ef8a194db59fbd37936a54da5b7364a8985c440
BLAKE2b-256 checksum
How to use checksums
39bb2c20abb1220921aee91b5eddc43ce1eef9c26873afee13c884e091c711c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

Release files / h_matchers-1.0.20191025.185835-py3-none-any.whl

Download URL h_matchers-1.0.20191025.185835-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c769cde18ba97e0a2ad59eaf4e85a5f6ce307a5986f4d8eedf39815717f66ca3
BLAKE2b-256 checksum
How to use checksums
c2d89855e7d13ec97ce35f57a66f7c8230d433576ce1d062513cff332c897198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

Security for h-matchers 1.0.20191025.185835

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page