• Malware Search
  • Python
  • Security
  • Twitter @decalage2
  • GitHub

Languages

  • English English
  • French French

Navigation

  • Contact
  • Content
  • Security
    • Forensics
    • Malware Analysis
    • VBA Macros
  • Python
  • Ruby
  • Windows
  • Weaponized File Formats
  • ExeFilter
  • Recent posts

Primary links

  • Malware Search
  • Python
  • Security
  • Twitter @decalage2
  • GitHub

Popular content

Today's:

  • Python tips - How to easily convert a list to a string for display
  • HTML.py - a Python module to easily generate HTML tables and lists
  • olefile - a Python module to read/write MS OLE2 files

All time:

  • Python tips - How to easily convert a list to a string for display
  • olefile - a Python module to read/write MS OLE2 files
  • HTML.py - a Python module to easily generate HTML tables and lists
Home › Content

Unit tests in Python

Here are several solutions to run unit tests in Python.

Python standard library:
- doctest: http://docs.python.org/lib/module-doctest.html
- unittest/PyUnit: http://pyunit.sourceforge.net/pyunit.html

Third-party:
- TestOOB: http://testoob.sourceforge.net
- py.test: http://codespeak.net/py/dist/test.html
- nose: http://www.somethingaboutorange.com/mrl/projects/nose/
- nose plugins repository: http://nose-plugins.jottit.com/

Articles comparing unittest, doctest and py.test:
http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-1-unit...
http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-2-doct...
http://agiletesting.blogspot.com/2005/01/python-unit-testing-part-3-pyte...

Presentation about nose: http://us.pycon.org/common/2008/talkdata/PyCon2008/079/nose_pycon08.pdf

  • Python

Creative Commons License
Except where otherwise noted, all content on this site www.decalage.info is licensed by Philippe Lagadec under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.