A nosetests plugin to format and colorize test failure output for readability.
Project description
nose-dehaze
A nosetests plugin to format and colorize test failure output for readability.
Without dehaze
:
With dehaze
:
Installation
pip install nose-dehaze
Usage
Load the plugin explicitly when calling nosetests:
nosetests --dehaze
or set the environment variable:
export NOSE_DEHAZE=1
nosetests
Supported unittest assert methods:
assertEqual
assertNotEqual
assertEquals
assertDictEqual
assertSetEqual
assertTupleEqual
assertListEqual
assertSequenceEqual
assertIs
assertIsNot
assertIsNone
assertIsNotNone
assertIsInstance
assertNotIsInstance
assertTrue
assertFalse
Mocks assert methods:
assert_called_once
assert_not_called
assert_called_with
assert_has_calls
Currently, diff colorization output can vary, especially for more complex assert comparisons such as large, nested dicts. This is a side effect of the way dehaze calculates diffs by utilizing difflib and passing in stringified expected/actual values.
Development
Refer to Makefile
for commands to test, autoformat, lint, typecheck, etc.
pip install -r requirements.txt # minimum to run code
pip install -r requirements-dev.txt # for autoformat, lint, type checking, debugging
pip install -r requirements-test.txt # for running tests
Testing
# simply run tests
make test
# run tests with all supported python versions
make test-all
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 Distributions
Hashes for nose_dehaze-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a861a3c3261e3bc9388c3dab6e14790df812da77b0ce3430142b7ec07519e8a |
|
MD5 | e2849ce52d453296f4e60fdffef85d5e |
|
BLAKE2b-256 | 1d495361d00baa902d627b3d1b0fa963e7f4e631e520b448e4949c8adaa8c6fa |
Hashes for nose_dehaze-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8da6343e741bacf3ac0d9e8236b741f86193287a1b40351f6b5b7bf32928a9cd |
|
MD5 | a207db3438676478449699d0f5829d61 |
|
BLAKE2b-256 | 64eebf9fa1b3e6a0b46654b23aa802bf9d2981b5f414d74d3f37d6aeda8701e3 |