Skip to content

Run tools and demos as part of the test suite #53399

Closed

Description

@merwok
BPO 9153
Nosy @birkenfeld, @ncoghlan, @abalkin, @merwok

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2010-12-30.22:37:35.615>
created_at = <Date 2010-07-04.15:31:11.907>
labels = ['type-feature', 'tests']
title = 'Run tools and demos as part of the test suite'
updated_at = <Date 2010-12-31.01:52:38.138>
user = 'https://github.com/merwok'

bugs.python.org fields:

activity = <Date 2010-12-31.01:52:38.138>
actor = 'eric.araujo'
assignee = 'none'
closed = True
closed_date = <Date 2010-12-30.22:37:35.615>
closer = 'georg.brandl'
components = ['Demos and Tools', 'Tests']
creation = <Date 2010-07-04.15:31:11.907>
creator = 'eric.araujo'
dependencies = []
files = []
hgrepos = []
issue_num = 9153
keywords = []
message_count = 6.0
messages = ['109228', '109242', '109251', '109320', '124942', '124946']
nosy_count = 6.0
nosy_names = ['georg.brandl', 'holdenweb', 'ncoghlan', 'belopolsky', 'eric.araujo', 'l0nwlf']
pr_nums = []
priority = 'low'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue9153'
versions = ['Python 3.2']

Activity

  1. merwok commented on Jul 4, 2010

    @merwok
    MemberAuthor

    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 http://mail.python.org/pipermail/python-dev/2010-June/101092.html)

    Is this a good idea?

  2. abalkin commented on Jul 4, 2010

    @abalkin
    Member

    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.

  3. merwok commented on Jul 4, 2010

    @merwok
    MemberAuthor

    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 :)

  4. ncoghlan commented on Jul 5, 2010

    @ncoghlan
    Contributor

    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).

  5. birkenfeld commented on Dec 30, 2010

    @birkenfeld
    Member

    Closing; Demo/ is no more.

  6. merwok commented on Dec 31, 2010

    @merwok
    MemberAuthor

    It seems there is no easy way to test tools apart from human inspection.

  7. changed the title [-]Run tests and demos as part of the test suite[/-] [+]Run tools and demos as part of the test suite[/+] on Dec 31, 2010
  8. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions