Skip to content

Unexpected <class 'TypeError'> exception in test_format #119780

Closed

Description

@skirpichev

Bug report

Bug description:

$ ./python -m test test_format
Using random seed: 982853282
0:00:00 load avg: 2.14 Run 1 test sequentially
0:00:00 load avg: 2.14 [1/1] test_format
Unexpected  <class 'TypeError'> : '%c requires an integer in range(256) or a single byte, not a bytes object of length 2'
Unexpected  <class 'TypeError'> : '%c requires an integer in range(256) or a single byte, not str'
Unexpected  <class 'TypeError'> : '%c requires an integer in range(256) or a single byte, not float'
Unexpected  <class 'TypeError'> : '%c requires an int or a unicode character, not float'
Unexpected  <class 'TypeError'> : '%c requires an int or a unicode character, not a string of length 2'
Unexpected  <class 'TypeError'> : '%c requires an int or a unicode character, not bytes'

== Tests result: SUCCESS ==

1 test OK.

Total duration: 171 ms
Total tests: run=18
Total test files: run=1/1
Result: SUCCESS

I would guess this was broken by b313cc6.

  1. Expected messages should be adjusted.
  2. I think that tests must fail in this case, so test_exc() should be fixed.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. Eclips4 commented on May 30, 2024

    @Eclips4
    Member
  2. added 3 commits that reference this issue on May 30, 2024
  3. added a commit that references this issue on May 31, 2024
  4. nineteendo commented on Jun 2, 2024

    @nineteendo
  5. skirpichev commented on Jun 2, 2024

    @skirpichev
    MemberAuthor

    The second part of the issue (test_exc() refactoring) - wasn't fixed.

  6. serhiy-storchaka commented on Jun 2, 2024

    @serhiy-storchaka
    Member

    Sure. @skirpichev, do you mind to create a new issue for ignored failures in test_format?

  7. skirpichev commented on Jun 2, 2024

    @skirpichev
    MemberAuthor
  8. added a commit that references this issue on Jul 11, 2024
  9. added a commit that references this issue on Jul 17, 2024
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-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions