Registry / testing / colour-runner

colour-runner

JSON →
library0.1.1pypypi✓ verified 86d ago

colour-runner is a Python library designed to provide color formatting for standard `unittest` test output. The project's last release was 0.1.1 in October 2018, and it has seen no significant updates since then. It is considered abandoned due to lack of maintenance, making it potentially incompatible with newer Python versions and modern testing practices.

pip install colour-runner
INSTALL
IMPORT
SIG · COLOUR-RUNNER
C
colour-runner
testingpythonv0.1.1
Install
2.2s avg
Import
267ms
Disk
25MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.915 runs
installs and imports cleanly · install 0.0s · import 0.288s · 26.6MB
glibc
py 3.103.915 runs
installs and imports cleanly · install 2.2s · import 0.247s · 27MB
25MB installed
● package 25MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ColourTextTestRunner
from colour_runner.runner import ColourTextTestRunner
from colour_runner import ColourTextTestRunner
The `ColourTextTestRunner` is located within the `runner` submodule, not directly under `colour_runner`.
ColourTextTestResult
from colour_runner.result import ColourTextTestResult
from colour_runner import ColourTextTestResult
The `ColourTextTestResult` is located within the `result` submodule.
ColourRunnerMixin (for Django)
from colour_runner.django_runner import ColourRunnerMixin
from colour_runner.runner import ColourRunnerMixin
For Django integration, the mixin is in the `django_runner` submodule.

This quickstart demonstrates how to use `ColourTextTestRunner` with a standard `unittest.TestCase` suite to get colored output in the terminal.

import unittest from colour_runner.runner import ColourTextTestRunner class ExampleTests(unittest.TestCase): def test_success(self): self.assertTrue(True) def test_failure(self): self.fail("This test is designed to fail") @unittest.skip("demonstrating skipping a test") def test_skipped(self): self.fail("This test should not run") if __name__ == '__main__': suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(ExampleTests)) runner = ColourTextTestRunner(verbosity=2) print("\nRunning tests with colour-runner:\n") runner.run(suite)
Debug
Known issues
breakingThe `colour-runner` library is unmaintained since 2018 and has not been tested with recent Python versions (3.6+). It may exhibit unexpected behavior or fail to run on modern Python environments due to API changes or dependency updates in the standard library.
fix
Consider using modern, actively maintained test runners like `pytest` (which provides rich, colored output by default) or `green` for `unittest` compatible tests.
affects: <=0.1.1
gotchaAs an alpha-stage project (Development Status :: 3 - Alpha), `colour-runner` was never intended for stable production use. Its APIs might not be fully robust or well-documented.
fix
Avoid using this library for new projects. If already in use, be aware of potential stability issues and consider migrating to a more stable solution.
affects: 0.1.1
gotchaTerminal color output can be inconsistent across different operating systems, terminal emulators, and Python environments. An older library like `colour-runner` may not correctly detect or output ANSI escape codes for all modern setups, leading to plain text output or corrupted terminal displays.
fix
Test the output extensively in your target environment. If issues arise, explore alternatives like `colorama` (for cross-platform ANSI support) or a different test runner that handles terminal output more robustly.
affects: <=0.1.1
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'colour_runner.runner'
Incorrect import path for `ColourTextTestRunner`.
fix
Ensure you are importing from the correct submodule: `from colour_runner.runner import ColourTextTestRunner`.
TypeError: __init__() got an unexpected keyword argument 'stream'
This error might occur when `ColourTextTestRunner` is instantiated with arguments that are no longer compatible with `unittest.TextTestRunner` in newer Python versions due to API changes in `unittest`.
fix
Downgrade to a Python version compatible with the library (e.g., Python 3.5 or earlier, as indicated by PyPI classifiers), or switch to a different test runner. Debugging the `unittest` source for the specific Python version might reveal the exact API change.
Upgrade
Version history
0.1.1latest on PyPI · released Oct 5, 2018
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
colour-runner — pip install colour-runner · libregistry