Skip to main content

Read better test failures

Project description

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

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
marbles-0.10.0-py2.py3-none-any.whl (3.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3
marbles-0.10.0.tar.gz (3.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page