Skip to content

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

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

Closed
skirpichev opened this issue May 30, 2024 · 5 comments
Closed

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

skirpichev opened this issue May 30, 2024 · 5 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@skirpichev
Copy link
Contributor

skirpichev commented May 30, 2024

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

@skirpichev skirpichev added the type-bug An unexpected behavior, bug, or error label May 30, 2024
@Eclips4
Copy link
Member

Eclips4 commented May 30, 2024

cc @serhiy-storchaka

@Eclips4 Eclips4 added the tests Tests in the Lib/test dir label May 30, 2024
skirpichev added a commit to skirpichev/cpython that referenced this issue May 31, 2024
skirpichev added a commit to skirpichev/cpython that referenced this issue May 31, 2024
serhiy-storchaka pushed a commit that referenced this issue May 31, 2024
…19781)

Mismatches were just output to the stdout, without making the test failing.
@nineteendo

This comment was marked as resolved.

@skirpichev
Copy link
Contributor Author

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

@serhiy-storchaka
Copy link
Member

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

@skirpichev
Copy link
Contributor Author

OK: #119949

noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
…pythonGH-119781)

Mismatches were just output to the stdout, without making the test failing.
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
…pythonGH-119781)

Mismatches were just output to the stdout, without making the test failing.
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

4 participants