Skip to main content

Testoot

codecov Documentation Status Maintainability

Testoot like "test out" of code for Python 3.4+. It's useful in unit and module testing when creating or rewriting test data is too boring. After you canonized the ideal output result all tests will pass until the data changes moment.

  • Writes data to the local filesystem storage
  • Supports binary, text, json and picklable objects
  • Different policies for resolving test conflicts

Currently integrates best with the PyTest, but other frameworks are also welcomed.

Example

One pytest function is the scope of the result. Newly calculated data compares with the original canonized result.

# testoot is the function scope helper fixture easy to setup
def test_simple(testoot: Testoot):
    result = {'a': 1}
    testoot.test(result)  # Commit first time

    result2 = {'a': 1}
    testoot.test(result2)  # Ok. No object result changes

    result3 = {'a': 3}  # Try commit change. Raised the AssertionError
    with pytest.raises(AssertionError) as e:
        testoot.test(result3)

To continue exploring you can visit the quickstart.

Using

pip3 install testoot

Documentation

https://testoot.readthedocs.io/

Development

Making virtualenv with development requirements:

python3 -m venv venv
venv/bin/pip install --upgrade pip
venv/bin/pip install -r requirements.txt

Testing

venv/bin/pytest -s tests
venv/bin/flake8 testoot --show-source --statistics
venv/bin/pytest --cov=testoot --cov-report html

Or for automatizing:

cp TEST.sh.example TEST.sh
chmod +x TEST.sh
./TEST.sh

Some tests uses console for user interaction. Add --canonize flag:

venv/bin/pytest -s tests --canonize

Building docs

Using sphinx:

cd docs
make

Metadata

Release files for testoot 0.0.5

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

Source distribution (sdist)

Source distribution for testoot 0.0.5
File Size Uploaded Provenance Actions
testoot-0.0.5.tar.gz 9.2 kB Without provenance Details for testoot-0.0.5.tar.gz

Release files / testoot-0.0.5.tar.gz

Download URL testoot-0.0.5.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
59c1d56782fb4d9a9556ec858e9cd12439673217fcb738b9846e2427018e44f7
BLAKE2b-256 checksum
How to use checksums
e998a92ae6eff9ee64a0346ccff3c4675485e995c2fbf5022c12cb810287f509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

Security for testoot 0.0.5

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.

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file No provenance

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