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

test_all_project_files() expected failure #57334

Closed
warsaw opened this issue Oct 7, 2011 · 10 comments
Closed

test_all_project_files() expected failure #57334

warsaw opened this issue Oct 7, 2011 · 10 comments
Labels
tests Tests in the Lib/test dir

Comments

@warsaw
Copy link
Member

warsaw commented Oct 7, 2011

BPO 13125
Nosy @warsaw, @pitrou, @vstinner, @benjaminp, @ezio-melotti, @merwok, @skrah
Files
  • i13125.patch: Patch
  • i13125-2.patch: 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 2012-02-27.19:01:39.053>
    created_at = <Date 2011-10-07.18:38:13.050>
    labels = ['tests']
    title = 'test_all_project_files() expected failure'
    updated_at = <Date 2017-04-20.12:45:38.557>
    user = 'https://github.com/warsaw'

    bugs.python.org fields:

    activity = <Date 2017-04-20.12:45:38.557>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-02-27.19:01:39.053>
    closer = 'pitrou'
    components = ['Tests']
    creation = <Date 2011-10-07.18:38:13.050>
    creator = 'barry'
    dependencies = []
    files = ['23440', '23484']
    hgrepos = []
    issue_num = 13125
    keywords = ['patch']
    message_count = 10.0
    messages = ['145122', '145130', '145181', '145795', '146050', '146094', '148197', '154501', '154502', '291971']
    nosy_count = 10.0
    nosy_names = ['barry', 'pitrou', 'vstinner', 'nadeem.vawda', 'benjamin.peterson', 'ezio.melotti', 'eric.araujo', 'skrah', 'python-dev', 'freiksenet']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue13125'
    versions = ['Python 3.2', 'Python 3.3']

    @warsaw
    Copy link
    Member Author

    warsaw commented Oct 7, 2011

    In working on bpo-11250, I noticed that lib2to3's test_parser.py tests were not enabled. Fixing that was easy enough, but then test_all_project_files() in TestParserIdempotency began failing. I've shaved enough yaks for the day so I am going to leave test_parser enabled but mark test_all_project_files() with @expectedfailure.

    Note that there are a number of failures here. There are two ParseErrors, one in main.py and one in pytree_idempotency.py. These both seem to fail on print(..., file=foo). After that, bom.py fails idempotency because the BOM does not show up in the converted file.

    @warsaw warsaw added the tests Tests in the Lib/test dir label Oct 7, 2011
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 7, 2011

    New changeset 914d3f035887 by Barry Warsaw in branch 'default':

    New changeset ed0315b9da72 by Barry Warsaw in branch 'default':

    @pitrou
    Copy link
    Member

    pitrou commented Oct 8, 2011

    Could you arrange to silence stdout/stderr in non-verbose mode?

    $ ./python -m test -uall test_lib2to3
    [1/1] test_lib2to3
    ParseError on file /home/antoine/cpython/default/Lib/lib2to3/main.py bad input: type=22, value='=', context=('', (81, 38))
    ParseError on file /home/antoine/cpython/default/Lib/lib2to3/tests/pytree_idempotency.py bad input: type=22, value='=', context=('', (47, 33))
    --- /home/antoine/cpython/default/Lib/lib2to3/tests/data/bom.py	2011-08-01 15:24:54.045209157 +0200
    +++ @	2011-10-08 20:31:41.981242859 +0200
    @@ -1,2 +1,2 @@
    -# coding: utf-8
    +# coding: utf-8
     print "BOM BOOM!"
    1 test OK.

    @freiksenet
    Copy link
    Mannequin

    freiksenet mannequin commented Oct 18, 2011

    I modified the tests so that they don't do prints to stdout. For that I replaced print with warnings in the "ParseError" exception except and replaced os.system with subprocess.getoutput.

    @freiksenet
    Copy link
    Mannequin

    freiksenet mannequin commented Oct 20, 2011

    Updated patch to work properly with verbosity.

    @warsaw
    Copy link
    Member Author

    warsaw commented Oct 21, 2011

    Note that I think it's best to fix the underlying failures rather than silence them. ;)

    @pitrou
    Copy link
    Member

    pitrou commented Nov 23, 2011

    Ping.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 27, 2012

    New changeset 2fd68efac05a by Antoine Pitrou in branch '3.2':
    Issue bpo-13125: Silence spurious test_lib2to3 output when in non-verbose mode.
    http://hg.python.org/cpython/rev/2fd68efac05a

    New changeset e721b2b74b59 by Antoine Pitrou in branch 'default':
    Issue bpo-13125: Silence spurious test_lib2to3 output when in non-verbose mode.
    http://hg.python.org/cpython/rev/e721b2b74b59

    @pitrou
    Copy link
    Member

    pitrou commented Feb 27, 2012

    Thank you for the patch, Mikhail. I got Benjamin to give it the ok and so it's now committed in 3.2 and 3.3!

    @pitrou pitrou closed this as completed Feb 27, 2012
    @vstinner
    Copy link
    Member

    I created the issue bpo-30117 since the bug wasn't fixed yet.

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants