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

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.2
File Size Uploaded
marbles-0.12.2.tar.gz 4.2 kB Details

Built distribution (wheel)

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

Total release size: 7.5 kB

Release files / marbles-0.12.2.tar.gz

Download URL marbles-0.12.2.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
da95b6a103ed2e6dedf4b326dbc3fb5dbfb95b2ace26e3567eb4aa19a55c1f5a
BLAKE2b-256 checksum
How to use checksums
5893f349041edc2c10c1eaa97a4a5412bf39a6d03af244b3362e8fac1d9280e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

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

Download URL marbles-0.12.2-py2.py3-none-any.whl
Size 3.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
95cace812eebdbc081fed7c8b3b0c414aa76530f3dfe01bfe5753249a617fab5
BLAKE2b-256 checksum
How to use checksums
73b69083b725ab25bf7df99091f42d2a410a97e912adb03fa4dd82f52f973581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release history Release notifications | RSS feed

0.12.3

2 release files

This release

0.12.2 This release

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

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