Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
@skirpichev

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

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