Many demos already include a self-test:
$ grep '^def test(' Demo/*/*.py
Demo/classes/Complex.py:def test():
Demo/classes/Dates.py:def test(firstyear, lastyear):
Demo/classes/Range.py:def test():
Demo/classes/Vec.py:def test():
Demo/parser/test_parser.py:def test():
Demo/pdist/FSProxy.py:def test():
Demo/pdist/RCSProxy.py:def test():
Demo/pdist/cmdfw.py:def test():
Demo/pdist/cvslib.py:def test():
Demo/pdist/cvslock.py:def test():
Demo/rpc/mountclient.py:def test():
Demo/rpc/nfsclient.py:def test():
Demo/rpc/rnusersclient.py:def test():
Demo/rpc/rpc.py:def test():
Demo/scripts/markov.py:def test():
Demo/sockets/gopher.py:def test():
Demo/threads/Generator.py:def test():
Demo/threads/sync.py:def test():
Demo/turtle/tdemo_penrose.py:def test(l=200, n=4, fun=sun, startpos=(0,0), th=2):
I think the first step should be to run those from regrtest. The next step would be to convert adhoc test functions into doctests or unit tests as appropriate.
Step zero, however, should be to decide which demos are worth keeping and which should be removed. |