Previous entry.

The numbers I posted earlier about zope.testing self-test coverage were incorrect. It turns out that when a test runner tries to trace a test that tests that a (different) test runner can use tracing to trace (different) tests, they both compete over a single sys.settrace() hook and only one of them wins. Basically you get to choose between a failing test or incomplete test coverage that ignores all subsequent tests.

If I skip the three tests that invoke sys.settrace() and run the rest with --coverage, I get that the zope.testing test suite covers 73% of the code. That's not bad, considering that some of the code is only invoked in a subprocess (which we cannot trace), and some of the code is platform-specific (if sys.platform == 'win32'), and some is Python-version-specific.

If I monkey-patch sys.settrace to set the hook only the first time it's called, I get one failing test (as expected) and I see 77% test coverage.

Oh, I forgot: that's the coverage with my prototype colorizing code which doesn't have unit tests yet. On trunk the coverage reaches 81%.

By the way, yesterday was the first time I saw an OLPC laptop in real life. It's so small and cute.

Vika and OLPC
Vika holding the XO laptop. What does XO mean, anyway?

Technorati tag: