Skip to main content

make unittest formatted and colorful output(cross platform)

Project description

Why?

Why do I write this plugin for nose ,The reason is so sample that the nose original report is so ugly, what’s the worse, not friendly for tester, actually python tester.

How?

How to use this nose plugin: colorunit, Only tree steps you need to follow:

Install colorunit:

1.1) Install with pip

pip install nose-colorxunit

1.2)Uninstall with pip

pip uninstall nose-colorxunit

2.1) Install with source

First, active your own python virtual environment if you have.

Then on the terminal type:

python setup.py build

python setup.py install

If you just want to install it as a super user or using sudo command, please think it again.

2.2) Uninstall with source

Just go to your own python virtual environment site-packages directory, and find nose_colorxunit-..-py..egg, then delete it.

Register colorunit [Optional]

Now this is optional, just write the following code snippet into Any one of your test files if you like, for example, test_demo.py.:

import nose
from colorunit import ColorUnit
if __name__ == '__main__':
    nose.main(addplugins=[ColorUnit()])

Run the test files

nosetests --with-colorunit

Connections

Name: Lesus

Email: walkingnine@gmail.com          |

Blog: http://my.oschina.net/swuly302/blog (Chinese)

If you have some good advice or idea, Welcome to communicate with me via email or be one of contributors!

TODO

  1. Adding a decorator class or method for finding and showing these taken time over your expected taken time.

  2. Logging the output into specific file

Issues

  1. Only for Linux[Fixed v0.1.2];

  2. Only for python2., not supports python3[Fixed v0.2.0]

  3. Showing every test case taken time[Fixed v0.1.4]

  4. Why it needs to be registered again. For more informations, Please see How : Register colorunit section[Fixed v0.1.4]

Snapshot

On Ubuntu:

Sample error page

On Windows XP:

Sample error page

Thanks!

  1. Vim 7.4

  2. stackedit

  3. nose

  4. colorama

LICENSE

APACHE LICENSE VERSION 2.0

Also see LICENSE file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nose-colorxunit-0.2.0.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file nose-colorxunit-0.2.0.tar.gz.

File metadata

File hashes

Hashes for nose-colorxunit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d165b5fab9c2c975dd3b2edd270de6b60e38fc327c2df6aac231e8daac5d1b48
MD5 f5ef932d7ef209d4dce4886fcf2211b9
BLAKE2b-256 4463bc3e74537f41e4cabc952abd21a666bf7173a4a92ee33e7c34e67a2687ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page