after becoming a happy bundlebuilder user I'm about to repackage a few tools and proto-tools of mine to increase their usability for a wider audience. Number one is "Pycotine" a native Mac OS X Cocoa GUI using PyObjC to the PyUnit test framework. Please see the attached Readme below. I'm glad about any comments you might have!
-- Dinu C. Gherman ...................................................................... "Fascism should more appropriately be called corporatism because it is a merger of state and corporate power." (Benito Mussolini)
Pycotine is a Mac OS X Cocoa GUI to the PyUnit test framework.
Pycotine (Python Cocoa Test Interface Environment) is a Cocoa GUI for Mac OS X to Steve Purcell's PyUnit test framework _. It allows you to execute a Python testsuite, possibly spread over many modules, comfortably from an application which shows statistical information about the ongoing tests with various counters and a progress bar. Errors and failures, usually reported on the commandline, are listed in a seperate part of the window. The user interface is very much designed after an existing Tkinter version _.
Using Pycotine you can open Python files (with extension ".py") and execute testsuites created in these files with the "unittest" module of the Python 2.x standard library. Right now, Pycotine first trys to import a function named "suite()" or "makeSuite()" from an opened Python module which it assumes to build and return a testsuite. If no such functions are found, it will search for all subclasses of unittest.TestCase in the top-level of the selected Python module.
The test files in samples/ were shamelessly copied from Steve Purcell's own original test cases for PyUnit 1.4.1 (just skipping the Tkinter ones for obvious reasons). I added only one new file, "listtestsfail.py" which shows a test failing on purpose, too.
There is one known bug which can crash Pycotine when it tries to load files having a full path with blanks and/or non-ASCII characters.
:0.2: first release, written in Objective-C, relying on an external Python interpreter :0.3: fully reimplemented in Python, using PyObjC :0.4: repackaged with Python 2.2.3 and PyObjC 1.0b included
There are no special requirements for running Pycotine. From version 0.4 it ships as a standalone application which should be running on any Mac OS X 10.x, althouth it was developped on 10.2. As it comes with full source code you can build Pycotine yourself, if you have Apple's developer tools installed, plus some Python interpreter version 2.2 or higher, plus PyObjC 1.0b.
Pycotine is released under the GPL - see the included file, "GPL.txt".
The Pycotine distribution, screenshots and a sample movie of Pycotine in action are all available from:
Pycotine was developped from its author's personal frustration with running (or rather not running) Tkinter on Mac OS X as the only existing GUI for PyUnit. While at the time it might have well been possible to get Tkinter running, it was probably easier to write this little tool...
Originally, Pycotine was written as a vanilla Cocoa application (sic!) in Objective-C, calling a dedicated TestRunner class in Python. Today, Pycotine is written entirely in Python using the excellent PyObjC _ bridging technology.
The future is uncertain, but I might spend a bit more time on this tool to add localisation to a few more languages and or make the errors and failures output more useful. Your help and suggestions are very welcome!
Dinu Gherman, dinu at mac dot com, 2003-09-09