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.20191030.155750

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.20191030.155750
File Size Uploaded Provenance
h_matchers-1.0.20191030.155750.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 10.5 kB

Release files / h_matchers-1.0.20191030.155750.tar.gz

Download URL h_matchers-1.0.20191030.155750.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7cf7ede51392c79324f221a802034cf9f3e5d09198f7d91f9ec9899824c38f19
BLAKE2b-256 checksum
How to use checksums
845bb525e554f5dc132ccb95aa61a4a13c6820d51dbf24ca0c219e77fc001023
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.20191030.155750-py3-none-any.whl

Download URL h_matchers-1.0.20191030.155750-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4cebf172e3e0091e653cba2821c71111d5e86c1aa34190c0a05d68f1605f2a65
BLAKE2b-256 checksum
How to use checksums
ee0eb86ddbd37a6ef6338b6c74d31c821eeb0abcb6da081253ae520d75542352
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.20191030.155750

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