Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meshy/colour-runner
Colour formatting for unittest output
https://github.com/meshy/colour-runner
Last synced: about 2 months ago
JSON representation
Colour formatting for unittest output
- Host: GitHub
- URL: https://github.com/meshy/colour-runner
- Owner: meshy
- License: mit
- Created: 2014-03-03T00:21:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-10-05T09:33:26.000Z (about 6 years ago)
- Last Synced: 2024-09-26T18:34:13.723Z (3 months ago)
- Language: Python
- Size: 21.5 KB
- Stars: 34
- Watchers: 5
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# colour-runner
Colour formatting for `unittest` test output.
## Installation
pip install colour-runner
### Django
Mix the `ColourRunnerMixin` into your `unittest` test runner (eg: in `project/runner.py`):
from django.test.runner import DiscoverRunner # Django 1.6's default
from colour_runner.django_runner import ColourRunnerMixinclass MyTestRunner(ColourRunnerMixin, DiscoverRunner):
passPoint django at it in `settings.py`:
TEST_RUNNER = 'project.runner.MyTestRunner'
You can also disable colour runner for an individual test run with Django's `--no-color` flag:
manage.py test --no-color
### Other Python
Where you would normally use:
* `unittest.TextTestRunner`, use `colour_runner.runner.ColourTextTestRunner`.
* `unittest.TextTestResult`, use `colour_runner.result.ColourTextTestResult`.