{"id":8905,"library":"colour-runner","title":"colour-runner","description":"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.","status":"abandoned","version":"0.1.1","language":"en","source_language":"en","source_url":"https://github.com/meshy/colour-runner","tags":["unittest","testing","color","terminal","output"],"install":[{"cmd":"pip install colour-runner","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"The `ColourTextTestRunner` is located within the `runner` submodule, not directly under `colour_runner`.","wrong":"from colour_runner import ColourTextTestRunner","symbol":"ColourTextTestRunner","correct":"from colour_runner.runner import ColourTextTestRunner"},{"note":"The `ColourTextTestResult` is located within the `result` submodule.","wrong":"from colour_runner import ColourTextTestResult","symbol":"ColourTextTestResult","correct":"from colour_runner.result import ColourTextTestResult"},{"note":"For Django integration, the mixin is in the `django_runner` submodule.","wrong":"from colour_runner.runner import ColourRunnerMixin","symbol":"ColourRunnerMixin (for Django)","correct":"from colour_runner.django_runner import ColourRunnerMixin"}],"quickstart":{"code":"import unittest\nfrom colour_runner.runner import ColourTextTestRunner\n\nclass ExampleTests(unittest.TestCase):\n    def test_success(self):\n        self.assertTrue(True)\n\n    def test_failure(self):\n        self.fail(\"This test is designed to fail\")\n\n    @unittest.skip(\"demonstrating skipping a test\")\n    def test_skipped(self):\n        self.fail(\"This test should not run\")\n\nif __name__ == '__main__':\n    suite = unittest.TestSuite()\n    suite.addTest(unittest.makeSuite(ExampleTests))\n    runner = ColourTextTestRunner(verbosity=2)\n    print(\"\\nRunning tests with colour-runner:\\n\")\n    runner.run(suite)","lang":"python","description":"This quickstart demonstrates how to use `ColourTextTestRunner` with a standard `unittest.TestCase` suite to get colored output in the terminal."},"warnings":[{"fix":"Consider using modern, actively maintained test runners like `pytest` (which provides rich, colored output by default) or `green` for `unittest` compatible tests.","message":"The `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.","severity":"breaking","affected_versions":"<=0.1.1"},{"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.","message":"As 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.","severity":"gotcha","affected_versions":"0.1.1"},{"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.","message":"Terminal 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.","severity":"gotcha","affected_versions":"<=0.1.1"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure you are importing from the correct submodule: `from colour_runner.runner import ColourTextTestRunner`.","cause":"Incorrect import path for `ColourTextTestRunner`.","error":"ModuleNotFoundError: No module named 'colour_runner.runner'"},{"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.","cause":"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`.","error":"TypeError: __init__() got an unexpected keyword argument 'stream'"}]}