kNose

the Komodo IDE/Edit extension for Python unit testing

kNose is my attempt to make Python unit testing in Komodo as simple as possible. It's a GUI front-end for the excellent nose framework written by Jason Pellerin.

Features:

Downloads

  1. nose version 0.10.1 by Jason Pellerin, available from the Python Package Index.
Note: The nose libraries must be installed into the default Python interpreter that Komodo uses for its autocompletion/shell/etc. You can verify this by going into Komodo's Edit menu, clicking Preferences, choosing the Languages: Python category and looking at the Default Python Interpreter combo box.
  1. kNose 1.1.3 - Released May 9, 2008 (Extension tested with Windows NT SP2 and Linux Mint Cassandra.)

Requirements

Komodo IDE or Komodo Edit, version 4.2 or higher.

Installation

  1. To install nose, follow the instructions on the project page.
  2. Start Komodo.
  3. Drop down the Tools menu, click on "Extension Manager", click on the Install button, and browse to find and load the knose.xpi on your system. Alternatively, you can drag the knose.xpi file onto the Komodo editor window.

Features and usage

Tests tab

All of kNose's features are accessed via the Tests tab on Komodo's left pane (also where the Projects tab is located).

kNose screenshot

The "Auto-test" checkbox, when checked, runs unit tests automatically every time a project file is saved. When "Auto-test" is unchecked, the "Run tests" button becomes enabled, and you must click this button manually each time you want your unit tests to be run.

The color bar will turn red if any tests result in errors or failures, and the bar will turn green when all tests pass.

The number of tests that pass, fail or give errors is counted below the color bar.

Hovering over a test method in the tree list will display a tooltip that shows the exception traceback (if any). Also, double-clicking a method that has a test failure or error will open the file and jump to the offending line.

NEW: kNose now features a statusbar icon that displays whether tests pass or fail even when the project pane is hidden.

Unit testing discovery

kNose will scan all the URIs in your active project, looking for the word 'test' in either the directory path or the filename. (This is to reduce the number of files passed to nose, since a Live Folder or other project structure with many files can cause nose to run very slowly.) The URIs that pass the check above get passed into nose, and nose runs them according to its own rules.

If kNose doesn't find any tests to run in your project, it will display a message saying "No tests were found." Hovering over this message will bring up a tooltip with debugging information that may help you understand what is going wrong. If you submit a bug report to me (see below), it will be helpful to include this information in the report.

Change list

Version 1.1.3:
Version 1.1.2:
Version 1.1.1:
Version 1.1:
Version 1.0:

Licensing

kNose is available under the Mozilla Public License 1.1.

Bug reports/Feature requests

Visit the python-knose issues page on google-code to report any issues. Feedback is welcome and appreciated.

Misc. notes

kNose is still pretty basic so far, so there's no support yet for other nose plugins.  kNose 1.2 will use the nose 0.10 plugin API and support plugins that way, but I can't promise when this will be finished.

I haven't tested kNose on a Mac yet, because I don't own one. Which probably means there will be issues, but I can't test them anyway. If you can do some Mac testing and fixing, however, I'll try and include any patches you come up with as long as it doesn't break any other functionality.

-- Brandon Corfman,  updated 05/09/2008