Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twosigma/marbles
Read better test failures.
https://github.com/twosigma/marbles
testing
Last synced: about 12 hours ago
JSON representation
Read better test failures.
- Host: GitHub
- URL: https://github.com/twosigma/marbles
- Owner: twosigma
- License: mit
- Created: 2018-05-18T21:52:15.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-07-09T18:54:06.000Z (4 months ago)
- Last Synced: 2024-10-29T04:41:17.384Z (9 days ago)
- Topics: testing
- Language: Python
- Homepage: https://marbles.readthedocs.io
- Size: 969 MB
- Stars: 116
- Watchers: 12
- Forks: 16
- Open Issues: 17
-
Metadata Files:
- Readme: README.rst
- Contributing: docs/contributing.rst
- License: LICENSE
Awesome Lists containing this project
README
.. image:: marbles.svg
:height: 150px
:width: 150px
:align: right=======
marbles
=======.. image:: https://img.shields.io/pypi/v/marbles.svg
:target: https://pypi.python.org/pypi/marbles.. image:: https://readthedocs.org/projects/marbles/badge/?version=latest
:target: https://marbles.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status.. image:: https://codecov.io/gh/twosigma/marbles/branch/master/graph/badge.svg
:target: https://codecov.io/gh/twosigma/marblesRead better test failures.
* Free software: MIT license
* Documentation: https://marbles.readthedocs.ioOverview
--------`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 testsFeatures
--------* 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 loggingDemo
----You can run the example tests provided to see what a `marbles` failure message
looks like.. image:: getting_started.png
You can also run your existing `unittest` tests with `marbles`
.. code-block:: bash
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:.. code-block:: bash
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``:.. code-block:: bash
[aliases]
test = marblesInstalling
----------.. code-block:: bash
pip install marbles