PyUnit Test Browser, by Phlip, extends PyUnit as an alternate GuiTestRunner.

PyUnit is the leading Unit Test system for Python.

OverviewEnter ./browser.py. You'l see a window with three panels. On top is a tree containing the test suites available in the current and sub folders. In the middle is a progress bar, which will soon turn green. On the bottom is a sickly yellow list box, where errors may appear.

Tap Enter, or Double Click on any node.

The Browser will traverse the tree, from top to bottom as shown, in alpha order, running each test, and incrementing the Cyan Bar for each one. If the bar reaches its goal Cyan, it turns Green.

To raise Vim at a file or function, click on its entry in the Tree, then click the second mouse button. This raises a Context Menu containing an option to edit your test code, or (if it's named correctly) to edit your source code.

If your code reports an error, you can click on any line in the error list in the format ' File "path/file.py", line 123...' or 'path/file.py:123: ...', the Browser will extract the file name and line number, and surf your editor to that line.

If you change code and hit Save (from any editor, not just Vim,) the Browser detects the file change, and re-runs the selected tests.

That's it. You now have completely incremental One Button Testing from any editor, and One Button Error Navigation over for Vim. Other editors are in the works.

On user-friendly desktops, if you use Alt+Tab to switch between the Browser and your editor, you can approach mouse-free development. But I'm unsure what to do on Macintosh desktops...

Dependencies
  • Python by Guido van Rossum
  • PyUnit by Steve Purcell
  • PythonMock by Dave Kirby
  • Python Megawidgets by Greg McFarlane
  • PyUnit Test Browser, provided, by Phlip
  • TreeBox, provided, by Arpad Kiss
  • Vim by Bram Moolenaar et. al.
  • DistributionLong term I will invite Dave to put this in pyunit/contrib/browser. For now, I'm just parking it in borrowed real-estate: http://flea.sourceforge.net/browser001.zip.
    DeploymentUnzip the zip file, go into the browser folder, and fire it up. After checking it all works, put it in your python/site-packages folder.
    Theory of OperationTODO
    Featuresibid
    Potential Code Reductionsibid
    Potential Code Expansionsibid