Skip to content

lecnim/cutest.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cutest.py

The colorful and beautiful terminal output of python unittest, inspired by Vows!

Example terminal output

Simple test source file powered by docstrings:

import cutest as unittest

class CoffeMachine(unittest.TestCase):
    """A good coffee machine"""

    def test_success(self):
        """should makes hot drinks"""

class Dog(unittest.TestCase):
    """A typical dog"""

    def test_barking(self):
        """should barks loudly"""
    def test_tail(self):
        """has a tail"""
        self.assertTrue(False)

class Cat(unittest.TestCase):
    """A typical cat"""

    def test_meow(self):
        """can meow"""
        print('an onomatopoeia for the voiced sound')
    def test_fur(self):
        """has a fur"""

if __name__ == "__main__":
    unittest.main()

Installation

Supported python versions:

3.2
3.3
3.4

Use pip to install...

$ pip install cutest.py

...or download a cutest.py script and it is ready to work. No requirements!

Usage

Import and use it just like unittest package:

import cutest as unittest

Or run and it will auto-discover available tests:

$ python cutest.py

You can also test given file or package:

$ python cutest.py my_test.py

Verbose and minimal mode

Standard minimalistic mode:

$ python cutest.py

Minimalistic mode

Verbose mode:

$ python cutest.py -v

Verbose mode

About

The colorful and beautiful terminal output of python unittest.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages