This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Run tools and demos as part of the test suite
Type: enhancement Stage:
Components: Demos and Tools, Tests Versions: Python 3.2
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, eric.araujo, georg.brandl, holdenweb, l0nwlf, ncoghlan
Priority: low Keywords:

Created on 2010-07-04 15:31 by eric.araujo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg109228 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-04 15:32
I propose that tests and demos be run during the test suite, as a sanity check to prevent them from getting badly out of sync (see “Signs of neglect thread?” starting at

Is this a good idea?
msg109242 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-04 17:18
Many demos already include a self-test:

$ grep '^def test(' Demo/*/*.py
Demo/classes/ test():
Demo/classes/ test(firstyear, lastyear):
Demo/classes/ test():
Demo/classes/ test():
Demo/parser/ test():
Demo/pdist/ test():
Demo/pdist/ test():
Demo/pdist/ test():
Demo/pdist/ test():
Demo/pdist/ test():
Demo/rpc/ test():
Demo/rpc/ test():
Demo/rpc/ test():
Demo/rpc/ test():
Demo/scripts/ test():
Demo/sockets/ test():
Demo/threads/ test():
Demo/threads/ test():
Demo/turtle/ 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.
msg109251 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-04 18:12
Yep, my idea was to add a really thin regrtest integration layer for these self-tests (which have no reason to move to Lib/tests, really), e.g. add a tests.test_demos_tools module that would import all these test functions and stuff them into a unittest test suite.

I did not detail that in my report since I wanted first an agreement on the idea (i.e. a core dev setting resolution to accepted :)
msg109320 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2010-07-05 14:08
Yep, a sanity check for these is a good idea, and doing it soon gives us plenty of time to work out the kinks with it before 3.2a1.

It will also let us identify which ones are completely busted by the switch to Python 3 (syntax errors) and which have other issues (self-test failures).
msg124942 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-30 22:37
Closing; Demo/ is no more.
msg124946 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-31 01:52
It seems there is no easy way to test tools apart from human inspection.
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53399
2010-12-31 01:52:38eric.araujosetnosy: georg.brandl, holdenweb, ncoghlan, belopolsky, eric.araujo, l0nwlf
messages: + msg124946
title: Run tests and demos as part of the test suite -> Run tools and demos as part of the test suite
2010-12-30 22:37:35georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg124942

resolution: accepted -> out of date
2010-07-05 18:19:30l0nwlfsetnosy: + l0nwlf
2010-07-05 14:08:42ncoghlansetresolution: accepted

messages: + msg109320
nosy: + ncoghlan
2010-07-04 18:12:11eric.araujosettype: enhancement
messages: + msg109251
2010-07-04 17:18:07belopolskysetnosy: + belopolsky
messages: + msg109242
2010-07-04 16:56:34eric.araujosetnosy: + holdenweb
2010-07-04 15:32:49eric.araujosetmessages: - msg109227
2010-07-04 15:32:42eric.araujosetmessages: + msg109228
2010-07-04 15:31:11eric.araujocreate