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

gh-131015: Add test for bytes formatting errors #131881

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ApostolFet
Copy link
Contributor

@ApostolFet ApostolFet commented Mar 29, 2025


pi = PseudoFloat(3.1415)

self.assertRaisesRegex(TypeError, '%x format: an integer is required, not float', operator.mod, '%x', 3.14)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make it so that all lines are under 80 chars please? I think the existing code is breaking that limit but I'm not entirely sure. More generally, you could do mod = operator.mod to reduce the overall line length as well.

mod = operator.mod
msg = "...."
self.assertRaisesRegex(TypeError, msg, mod, ...)

Or use a private helper for this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants