Skip to main content
marbles.svg

marbles

https://img.shields.io/pypi/v/marbles.svg https://img.shields.io/travis/twosigma/marbles.svg Documentation Status https://codecov.io/gh/twosigma/marbles/branch/master/graph/badge.svg

Read better test failures.

Overview

marbles is a Python unittest extension that allows test authors to write richer tests that expose more information on test failure to help you debug failing tests faster.

  • Treat test failures as documentation

  • Contextualize failures without digging through test code and dropping debugging statements everywhere

  • Write clearer, more explicit tests

Features

  • Drop-in unittest replacement

  • Information-rich failure messages

    • The full statement that failed (instead of just the last line)

    • Local variables in scope at the time the test failed

    • Optional annotation provided by the test author with details about the test

    • Ability to toggle traceback

  • Semantically-rich assertion methods

  • Assertion logging

Demo

You can run the example tests provided to see what a marbles failure message looks like

getting_started.png

You can also run your existing unittest tests with marbles

python -m marbles test_module.py

Marbles also creates a setuptools command so if you are used to running python setup.py test, you can now run:

python setup.py marbles

You can go one step further and alias the command test to run marbles by adding the following to setup.cfg:

[aliases]
test = marbles

Installing

pip install marbles

Release files for marbles 0.12.1

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

Source distribution (sdist)

Source distribution for marbles 0.12.1
File Size Uploaded Provenance Actions
marbles-0.12.1.tar.gz 4.6 kB Without provenance Details for marbles-0.12.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for marbles 0.12.1
File Interpreter ABI Platform Actions
marbles-0.12.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for marbles-0.12.1-py2.py3-none-any.whl

Total release size: 7.9 kB

Release files / marbles-0.12.1.tar.gz

Download URL marbles-0.12.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6c729cc81671eaa71a79b587c3d58d6d90db775a8d0fe2a3b1e4e8a0376d20ff
BLAKE2b-256 checksum
How to use checksums
7d3b00d5029568c106848ee8f9dc2fcdab337efd95b6fda41141d2933ecb1db5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3

Release files / marbles-0.12.1-py2.py3-none-any.whl

Download URL marbles-0.12.1-py2.py3-none-any.whl
Size 3.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
16cc3e11a8ca363728c0c397ec986f459576aa93641ca557ae8b51655c77556f
BLAKE2b-256 checksum
How to use checksums
d905b2aa5d4f2fb5393be2b213d4d4c99032095cf72942f90e4e8d30f434e989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3

Security for marbles 0.12.1

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