Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regrtest.py -R not working #46476

Closed
ocean-city mannequin opened this issue Mar 3, 2008 · 15 comments
Closed

regrtest.py -R not working #46476

ocean-city mannequin opened this issue Mar 3, 2008 · 15 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@ocean-city
Copy link
Mannequin

ocean-city mannequin commented Mar 3, 2008

BPO 2223
Nosy @rhettinger, @abalkin, @tiran, @voidspace, @florentx
Files
  • regrtest.patch: diff against revision 61203
  • doctest_twice.zip
  • fix_test_collections.patch
  • 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-03-22.12:00:36.279>
    created_at = <Date 2008-03-03.16:27:08.227>
    labels = ['type-bug', 'tests']
    title = 'regrtest.py -R not working'
    updated_at = <Date 2010-03-22.12:00:36.277>
    user = 'https://bugs.python.org/ocean-city'

    bugs.python.org fields:

    activity = <Date 2010-03-22.12:00:36.277>
    actor = 'flox'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-03-22.12:00:36.279>
    closer = 'flox'
    components = ['Tests']
    creation = <Date 2008-03-03.16:27:08.227>
    creator = 'ocean-city'
    dependencies = []
    files = ['9596', '9599', '9601']
    hgrepos = []
    issue_num = 2223
    keywords = ['patch']
    message_count = 15.0
    messages = ['63215', '63220', '63221', '63222', '63223', '63225', '63227', '63228', '63229', '63231', '63244', '63248', '63250', '63275', '101495']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'belopolsky', 'ocean-city', 'christian.heimes', 'michael.foord', 'flox']
    pr_nums = []
    priority = 'high'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2223'
    versions = ['Python 2.6', 'Python 3.0']

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Mar 3, 2008

    Sorry, I don't have patch, but regrtest.py -R not working now.

    E:\python-dev\trunk\Lib\test>py25 regrtest.py -R ::
    test_grammar
    test_grammar skipped -- No module named _abcoll

    E:\python-dev\trunk\Lib\test>py regrtest.py -R ::
    test_grammar
    test_grammar skipped -- cannot import name _Abstract

    E:\python-dev\trunk\Lib\test>py3k regrtest.py -R ::
    File "regrtest.py", line 174
    print __doc__
    ^
    SyntaxError: invalid syntax

    @ocean-city ocean-city mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Mar 3, 2008
    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Mar 3, 2008

    Sorry, I was stupid. I ran test in wrong directory.
    release25-maint runs fine, and other two has same
    error.

    test_grammar
    test_grammar skipped -- cannot import name _Abstract

    @tiran
    Copy link
    Member

    tiran commented Mar 3, 2008

    I'm going to work on the issue later

    @abalkin
    Copy link
    Member

    abalkin commented Mar 3, 2008

    It looks like you are running regrtest from the trunk with the py3k
    interpretor.

    Works for me.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Mar 3, 2008

    Yes, I did mistake first, but py3k fails even in correct directory.

    E:\python-dev\py3k\Lib\test>py3k --version
    Python 3.0a3+

    E:\python-dev\py3k\Lib\test>py3k regrtest.py -R :: test_os.py
    test_os
    test_os skipped -- cannot import name _Abstract
    1 test skipped:
    test_os
    1 skip unexpected on win32:
    test_os
    [43267 refs]

    abc._Abstract seems to be gone at r61098, but regrtest.py still
    references to it.

    @abalkin
    Copy link
    Member

    abalkin commented Mar 3, 2008

    attached simple patch seems to fix the problem but should be reviewed by
    Christian.

    @tiran
    Copy link
    Member

    tiran commented Mar 3, 2008

    It seems r61204 has fixed the bug. Can you test it on your machine
    please? My old laptop is too slow.

    @abalkin
    Copy link
    Member

    abalkin commented Mar 3, 2008

    Can you test it on your machine please?

    Running on a 4-core Opteron (2.6GHz).

    Should complete in an hour or so ...

    @abalkin
    Copy link
    Member

    abalkin commented Mar 3, 2008

    test_collections fails (with -R :: only). Does not look like something
    related to the recent changes, rather test is not happy about being
    repeated.

    $ ./python Lib/test/regrtest.py -R ::  test_collections 
    test_collections
    beginning 9 repetitions
    123456789
    test test_collections failed -- Traceback (most recent call last):
      File "Lib/doctest.py", line 2131, in runTest
        raise self.failureException(self.format_failure(new.getvalue()))
    AssertionError: Failed doctest test for collections.namedtuple
      File "Lib/collections.py", line 13, in namedtuple

    ..

    @abalkin
    Copy link
    Member

    abalkin commented Mar 3, 2008

    Here are the results from regrtest.py -R ::

    ..
    301 tests OK.
    7 tests failed:
    test_collections test_cprofile test_frozen test_inspect
    test_logging test_pkg test_profile
    ..
    $ cat reflog.txt
    test_cmd_line leaked [-23, 0, 0, 23] references, sum=0
    test_compiler leaked [0, 0, 18, 0] references, sum=18
    test_deque leaked [100, 100, 100, 100] references, sum=400
    test_ftplib leaked [0, 172, -6, -166] references, sum=0
    test_heapq leaked [108, 130, 121, 114] references, sum=473
    test_itertools leaked [7380, 7380, 7380, 7380] references, sum=29520
    test_list leaked [50, 50, 50, 50] references, sum=200
    test_set leaked [680, 680, 680, 680] references, sum=2720
    test_smtplib leaked [0, 0, -86, 86] references, sum=0
    test_threading leaked [0, 86, -86, 86] references, sum=86
    test_urllib2_localnet leaked [3, 3, 3, 3] references, sum=12
    test_userlist leaked [50, 50, 50, 50] references, sum=200

    Do buildbots run -R regressions?

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Mar 4, 2008

    I can see test_collections.py failure even on r61203
    (just before Christian's commit) - r61098 (removed abc._Abstract)

    E:\python-dev\trunk\Lib\test>py regrtest.py -R :: test_collections.py
    test_collections
    beginning 9 repetitions
    123456789
    test test_collections failed -- Traceback (most recent call last):
      File "e:\python-dev\trunk\lib\doctest.py", line 2131, in runTest
        raise self.failureException(self.format_failure(new.getvalue()))
    AssertionError: Failed doctest test for collections.namedtuple
      File "e:\python-dev\trunk\lib\collections.py", line 13, in namedtuple
    
    ----------------------------------------------------------------------
    File "e:\python-dev\trunk\lib\collections.py", line 16, in
    collections.namedtupl
    e
    Failed example:
        Point = namedtuple('Point', 'x y')
    Exception raised:
        Traceback (most recent call last):
          File "e:\python-dev\trunk\lib\doctest.py", line 1231, in __run
            compileflags, 1) in test.globs
          File "<doctest collections.namedtuple[0]>", line 1, in <module>
            Point = namedtuple('Point', 'x y')
        NameError: name 'namedtuple' is not defined
    (snip)

    I'll run py regrtest.py -R :: on r61203 - r61098 and compare its
    result to Alexander's result, but my machine is damn slow, probably
    it'll take long time.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Mar 4, 2008

    I'll run py regrtest.py -R :: on r61203 - r61098 and compare its
    result to Alexander's result, but my machine is damn slow, probably
    it'll take long time.

    Sorry, I abandoned this at test_compiler. Please forget this sentense...

    Anyway, Christian's fix greatly works for me. Thanks!

    E:\python-dev\trunk\Lib\test>py regrtest.py -R :: test_collections.py

    For this error, I could write a minimam code to reproduce it.
    Please expand the attached zip file into lib/test and run a.py.
    You'll see similar error.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Mar 4, 2008

    I wrote simple patch to workaround this problem.
    (avoid to reuse DocTestSuite)

    # To my eyes, doctest.DocTestSuite(module=collections)
    # and test_support.run_doctest(collections, verbose)
    # are doing same test???

    @rhettinger rhettinger self-assigned this Mar 4, 2008
    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Mar 5, 2008

    I did more investigation.
    Failure on second DocTestSuite run happens because
    lib/doctest.py (2107) test.globs.clear()
    is executed after first test runs.

    I don't know if this is bug or not. Document in
    doctest.py says test.globs will be untouched on
    failure but become empty on success, but this
    behavior prevents reusage of DocTestSuite.

    @rhettinger rhettinger removed their assignment Mar 17, 2008
    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 22, 2010

    No known issues with "regrtest -R :" on trunk.

    @florentx florentx mannequin closed this as completed Mar 22, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants