Skip to main content

Simplify your test assertions forever.

from pyariable import Variable

def test_dict():
    x = Variable()
    y = Variable()
    assert {1: "XXX", 2: "XXX", 3: "YYY"} == {1: x, 2: x, 3: y}
    assert x != y

In some tests it’s common to get a random ID back from a database. Your assertions are simpler when you substitute a Variable object for the expected value.

from pyariable import Variable

def test_list():
    x = Variable()
    y = Variable()
    assert [
        {"db_id": 590, "name": "alice"},
        {"db_id": 590, "name": "bob"},
        {"db_id": 999, "name": "charlie"},
    ] == [
        {"db_id": x, "name": "alice"},
        {"db_id": x, "name": "bob"},
        {"db_id": y, "name": "charlie"},
    ]
    assert x != y
    assert x < y

Installation

pip install pyariable

Metadata

Release files for pyariable 0.9.0

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

Source distribution (sdist)

Source distribution for pyariable 0.9.0
File Size Uploaded Provenance Actions
pyariable-0.9.0.tar.gz 2.0 kB Without provenance Details for pyariable-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyariable 0.9.0
File Interpreter ABI Platform Actions
pyariable-0.9.0-py3-none-any.whl Python 3 none any Details for pyariable-0.9.0-py3-none-any.whl

Total release size: 4.4 kB

Release files / pyariable-0.9.0.tar.gz

Download URL pyariable-0.9.0.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0b6ddc90bfdd60de122df922c3d0bd876116a85c93615db1a22c8daae8a972b9
BLAKE2b-256 checksum
How to use checksums
c892d8dc4162b46c4f4ca79d99fe7d49b82341d39d19702ee677d5b794f5bffb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.7 Darwin/25.0.0

Release files / pyariable-0.9.0-py3-none-any.whl

Download URL pyariable-0.9.0-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
588ec98c6d760ed083b93d5e055c43080361034ac0a66ffa824f7aa8df735828
BLAKE2b-256 checksum
How to use checksums
9f2939a7e8543caf8bd9d92e42ee33c5033e395d514780509b9bd22f41b3e771
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.7 Darwin/25.0.0

Security for pyariable 0.9.0

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