Skip to content

test_clinic fails with the --forever argument #117347

Closed

Description

@Eclips4

Bug report

Bug description:

./python -m test -q test_clinic --forever
Using random seed: 2016588083
0:00:00 load avg: 16.10 Run tests sequentially
test test_clinic failed -- Traceback (most recent call last):
  File "/home/eclips4/CLionProjects/cpython/Lib/test/test_clinic.py", line 2675, in test_cli_converters
    self.assertTrue(out.endswith(finale), out)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true :
Legacy converters:
    B C D L O S U Y Z Z#
    b c d f h i l p s s# s* u u# w* y y# y* z z# z*

Converters:
    bool(accept={<class 'object'>})
    byte(bitwise=False)
    char()
    Custom()
    defining_class(type=None)
    double()
    fildes()
    float()
    int(accept={<class 'int'>}, type=None)
    long()
    long_long()
    object(converter=None, type=None, subclass_of=None)
    Py_buffer(accept={<class 'clinic.buffer'>})
    Py_complex()
    Py_ssize_t(accept={<class 'int'>})
    Py_UNICODE(accept={<class 'str'>}, zeroes=False)
    PyByteArrayObject()
    PyBytesObject()
    self(type=None)
    short()
    size_t()
    slice_index(accept={<class 'NoneType'>, <class 'int'>})
    str(accept={<class 'str'>}, encoding=None, zeroes=False)
    unicode()
    unsigned_char(bitwise=False)
    unsigned_int(bitwise=False)
    unsigned_long(bitwise=False)
    unsigned_long_long(bitwise=False)
    unsigned_short(bitwise=False)

Return converters:
    bool()
    Custom()
    double()
    float()
    int()
    long()
    object()
    Py_ssize_t()
    size_t()
    unsigned_int()
    unsigned_long()

All converters also accept (c_default=None, py_default=None, annotation=None).
All return converters also accept (py_default=None).



== Tests result: FAILURE ==

1 test failed:
    test_clinic

Total duration: 586 ms
Total tests: run=290 failures=1
Total test files: run=2 failed=1
Result: FAILURE

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. Eclips4 commented on Mar 28, 2024

    @Eclips4
    MemberAuthor

    Probably related to 7aa89bc

  2. erlend-aasland commented on Mar 28, 2024

    @erlend-aasland
    Contributor
  3. erlend-aasland commented on Mar 28, 2024

    @erlend-aasland
    Contributor

    Probably related to 7aa89bc

    I can confirm that reverting 7aa89bc resolves this issue.

  4. erlend-aasland commented on Mar 28, 2024

    @erlend-aasland
    Contributor

    The test is failing because the custom converter from test_no_access_to_members_in_converter_init lingers after the first run.

  5. erlend-aasland commented on Mar 28, 2024

    @erlend-aasland
    Contributor

    Actually, the custom converter is added in three different tests:

    • test_badly_formed_return_annotation
    • test_no_access_to_members_in_converter_init
    • test_external

    I'm unable to trigger the problem if I disable all these tests using the -i test runner option.

  6. erlend-aasland commented on Mar 28, 2024

    @erlend-aasland
    Contributor

    Well, perhaps the test is too strict; perhaps we should loosen it even more.

  7. added 2 commits that reference this issue on Mar 29, 2024
  8. vstinner commented on Mar 29, 2024

    @vstinner
    Member

    I wrote PR gh-117363 to fix side effects of previous tests.

  9. vstinner commented on Mar 29, 2024

    @vstinner
    Member

    I can confirm that reverting 7aa89bc resolves this issue.

    Well, the old code didn't care of test side effects. The new code is affected by these side effects. My PR fix test side effects.

  10. added 3 commits that reference this issue on Mar 29, 2024
  11. added a commit that references this issue on Mar 29, 2024
  12. added a commit that references this issue on Mar 29, 2024
  13. Eclips4 commented on Mar 29, 2024

    @Eclips4
    MemberAuthor

    Thanks Victor for fixing this!

  14. added a commit that references this issue on Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions