├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.md ├── pytest_colordots.py ├── screenshot.png └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | lib/ 17 | lib64/ 18 | parts/ 19 | sdist/ 20 | var/ 21 | *.egg-info/ 22 | .installed.cfg 23 | *.egg 24 | 25 | # PyInstaller 26 | # Usually these files are written by a python script from a template 27 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 28 | *.manifest 29 | *.spec 30 | 31 | # Installer logs 32 | pip-log.txt 33 | pip-delete-this-directory.txt 34 | 35 | # Unit test / coverage reports 36 | htmlcov/ 37 | .tox/ 38 | .coverage 39 | .cache 40 | nosetests.xml 41 | coverage.xml 42 | 43 | # Translations 44 | *.mo 45 | *.pot 46 | 47 | # Django stuff: 48 | *.log 49 | 50 | # Sphinx documentation 51 | docs/_build/ 52 | 53 | # PyBuilder 54 | target/ 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Sven-Hendrik Haase 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.txt 2 | include *.md 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **NOTE: This is deprecated as this is now included in pytest itself!** 2 | 3 | pytest-colordots 4 | ================ 5 | 6 | Colorizes the progress indicators 7 | 8 | ![Screenshot](screenshot.png) 9 | 10 | Usage 11 | ----- 12 | 13 | Install with: 14 | 15 | pip install -U pytest-colordots 16 | 17 | and then run your test suite: 18 | 19 | py.test 20 | 21 | and marvel at all the pretty colors 22 | 23 | 24 | Compatibility 25 | ------------- 26 | 27 | This plugin uses colorama and should therefore work on Linux, OSX, BSD and 28 | Windows. 29 | -------------------------------------------------------------------------------- /pytest_colordots.py: -------------------------------------------------------------------------------- 1 | from colorama import init 2 | from colorama import Fore 3 | init() 4 | 5 | 6 | def pytest_report_teststatus(report): 7 | if report.when == 'call': 8 | if hasattr(report, 'wasxfail'): 9 | if report.skipped: 10 | return "xfailed", Fore.YELLOW + "x" + Fore.RESET, "xfail" 11 | elif report.passed: 12 | return "xpassed", Fore.YELLOW + "p" + Fore.RESET, ("XPASS", {'yellow': True}) 13 | if report.passed: 14 | letter = Fore.GREEN + "." + Fore.RESET 15 | elif report.skipped: 16 | letter = Fore.YELLOW + "s" + Fore.RESET 17 | elif report.failed: 18 | letter = Fore.RED + "F" + Fore.RESET 19 | return report.outcome, letter, report.outcome.upper() 20 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svenstaro/pytest-colordots/fca82b00a440214e9da5d40393a549d57ffd9187/screenshot.png -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | from setuptools import setup 5 | 6 | 7 | def read(fname): 8 | return open(os.path.join(os.path.dirname(__file__), fname)).read() 9 | 10 | 11 | setup( 12 | name='pytest-colordots', 13 | license='MIT', 14 | description='Colorizes the progress indicators', 15 | author='Sven-Hendrik Haase', 16 | author_email='svenstaro@gmail.com', 17 | url='https://github.com/svenstaro/pytest-colordots', 18 | long_description=read("README.md"), 19 | version='1.1', 20 | py_modules=['pytest_colordots'], 21 | entry_points={'pytest11': ['colordots = pytest_colordots']}, 22 | install_requires=['pytest>=2.0', 'colorama'], 23 | classifiers=[ 24 | 'Development Status :: 5 - Production/Stable', 25 | 'Topic :: Software Development :: Testing', 26 | 'Intended Audience :: Developers', 27 | 'Operating System :: OS Independent', 28 | ] 29 | ) 30 | --------------------------------------------------------------------------------