Skip to main content

Read better test failures

Project description

marbles.svg

marbles

https://img.shields.io/pypi/v/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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marbles-0.12.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marbles-0.12.3-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file marbles-0.12.3.tar.gz.

File metadata

  • Download URL: marbles-0.12.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for marbles-0.12.3.tar.gz
Algorithm Hash digest
SHA256 2840dd2aa9155fba3f91ecc80588e9254e1901673de912a490bb0c145373f49d
MD5 204dd57b24a5aaec00c88cea2580dbe3
BLAKE2b-256 1964d18123de75855c8ba931e4423b3d65a402f5df4e0286869a9de1469ce144

See more details on using hashes here.

File details

Details for the file marbles-0.12.3-py2.py3-none-any.whl.

File metadata

  • Download URL: marbles-0.12.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for marbles-0.12.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 536d2ea0da43f9001ad84e789d4c10179ac0c7d6e837625487f4ed93d5f33821
MD5 e207b09633529972cac02cad84a7a8a0
BLAKE2b-256 107623199c14c62551cc67fc993b144ad77a2d24bfc03ce63fa8d06f47e517a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page