Monday, October 24, 2005

Nose update: 0.6 released

A new version of nose is up with a few bug fixes and a new feature. Get it here.

What's new

  • New nosetests script. This replaces python -m nose as a means of running the module, as it is now a package, and python's -m switch can't be used with modules in packages.
  • Allow specification of names on command line that are loadable but not directly loadable as modules (eg nosetests -o path/to/tests.py)
  • Add optional py.test-like assert introspection. Thanks to Kevin Dangoor for the suggestion. Activate this feature with the -d switch.
  • Improvements to selftest (see tests/test_fail.py and the tests in fail).

Sunday, October 09, 2005

Announcing nose: python unittest extension

My latest long-term home project (nevermind what it is, it's ages away from being anything) spawned a little sub-project, which I'm releasing today, having finally come up with the requisite name that sounds clever at first but seems less and less so each time you hear it.

nose is a unittest extension for python that does some of the more useful things that py.test does, without resorting to py-style magic. It lets you write tests more simply, provides more options for setup/teardown hooks, and lets you use print-style debugging of tests more easily by capturing stdout during test runs and only printing output for failing tests.

If you have occasion to write python unittests, check out the first release.