[Python-checkins] r60529 - in python/trunk/Lib/test: output/test_cProfile test_cProfile.py test_cprofile.py

Brett Cannon brett at python.org
Sun Feb 3 03:46:25 CET 2008


On Feb 2, 2008 6:21 PM, Christian Heimes <lists at cheimes.de> wrote:
> georg.brandl wrote:
> > Author: georg.brandl
> > Date: Sat Feb  2 12:46:07 2008
> > New Revision: 60529
> >
> > Added:
> >    python/trunk/Lib/test/test_cprofile.py
> >       - copied, changed from r60520, python/trunk/Lib/test/test_cProfile.py
> > Removed:
> >    python/trunk/Lib/test/output/test_cProfile
> >    python/trunk/Lib/test/test_cProfile.py
> > Log:
> > Rewrite test_cprofile as unittest (and rename the file to be consistent
> > with all other test files). Written for GHOP by Benjamin Peterson.
>
> I don't think it was a good idea to rewrite the test as doc test. The
> doc test can't be easily updated and they *have* to be updated every
> time Lib/io.py changes in py3k.

But how is the situation going to be any better using unittest?

The thing to remember about this, Christian, is that we had a high
schooler do this. It was simpler to say, "take this output-comparing
test and move to doctest", than to say, "come up with a completely new
way to test this code using unittest". This at least gets us off of
output-based testing for this. It can always be reworked later as a
unittest if io.py ends up changing that often.

-Brett


More information about the Python-checkins mailing list