Semantically-rich assertions for use in marbles and unittest test cases
Project description
marbles
Read better test failures.
Free software: MIT license
Documentation: https://marbles.readthedocs.io
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file marbles.mixins-0.12.3.tar.gz
.
File metadata
- Download URL: marbles.mixins-0.12.3.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad2be2c394b3fa751b2ce1f078fe364a7a5c9556334c9370a7f2fc36d9df4ccd |
|
MD5 | a6acba86244db16f695a6a2a51bee0ff |
|
BLAKE2b-256 | 86028c900d8c1e4677d439c1b8ad147b194180a0e2bd38ef0c67fd5a892aae58 |
File details
Details for the file marbles.mixins-0.12.3-py2.py3-none-any.whl
.
File metadata
- Download URL: marbles.mixins-0.12.3-py2.py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d4a13640c1559835b89c6fc16b0c270859661c72a86a4acc829b4d04db654c7 |
|
MD5 | 5a9798890ad6091b04c5e00f1d9229b6 |
|
BLAKE2b-256 | fc2e23a83734b2d75539854b6f7dea5dbed5c351fdc1360a6463f6e0b04c1806 |