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.

Author ned.deily
Recipients ned.deily
Date 2014-06-29.23:56:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404086161.6.0.896977354321.issue21882@psf.upfronthosting.co.za>
In-reply-to
Content
Although the turtledemo modules are not run directly during by "make test" or by "python -m test -uall", they are currently being inadvertently imported by test___all__.  This can lead to test failures and side effects because some of the turtledemo modules execute code on import, rather than only when being run via calls to their main() functions.  A quick glance shows problems with the following demos: clock (calls mode("logo") which causes a window to appear), colormixer (which unconditionally calls sys.setrecursionlimit()), and two_canvases (which is not structured using functions at all).  Depending on how tests are run, these problems can cause serious side effects.

At a minimum,
1. test___all__ should be changed to exclude turtledemo modules.

It would also be nice to make the demos better citizens:
2. move the mode() call to main() in clock
3. move the setrecursionlimit call to main() and save and restore the original value on exit
4. restructure two_canvases to be like the other demos.
5. double-check all demos for other cases where interpreter state is changed and not restored.
History
Date User Action Args
2014-06-29 23:56:02ned.deilysetrecipients: + ned.deily
2014-06-29 23:56:01ned.deilysetmessageid: <1404086161.6.0.896977354321.issue21882@psf.upfronthosting.co.za>
2014-06-29 23:56:01ned.deilylinkissue21882 messages
2014-06-29 23:56:01ned.deilycreate