← Back to team overview

yellow team mailing list archive

Tests for zope.testing

 

Hi Graham and others,

After doing some digging with Benji, we discovered the problems between the branch Benji and Graham did and the branch I merged was that both efforts were mucking with sys.stdout and sys.stderr.  The Graham/Benji branch changed many of the zope.testing docttests to combine sys.__stdout__ and sys.stdout.  My branch took anything that appeared in sys.stdout and added it to the subunit output stream.

The results were unpleasant.  Doctest results were being written into the doctest subunit expected results and everything collapsed upon itself.

Benji suggested, and I agreed, that we could avoid those problems by not using doctests for subunit.

I experimented by converting testrunner-subunit.txt to be a unittest.  This new test I've called test_testrunner_subunit.py.  I didn't get through with that file conversion but I have a reproducible framework and the tests I've converted all pass.  Hurrah.  (The expected output required considerable massaging.)

So, Graham, if you want to pick it up, the task is to finish the file conversion.  (I'm just going through the doctest and converting every subtest into a corresponding unittest testcase.  Should be easy to follow.)

After that, then testrunner-subunit-layer-setup-failures.txt needs to be converted too.  There are two more subunit doctests but they aren't (currently) failing.

My work has been pushed to:

bzr+ssh://bazaar.launchpad.net/~bac/zope.testing/fix-tests/

--Brad