Skip to content

gh-103786: Fix DeprecationWarnings in test_fstring. #103787

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
wants to merge 3 commits into from

Conversation

jaimealonso
Copy link
Contributor

@jaimealonso jaimealonso commented Apr 24, 2023

@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Apr 24, 2023
@jaimealonso jaimealonso force-pushed the fix-issue-103786 branch 2 times, most recently from cfe976b to d43bf0c Compare April 24, 2023 18:59
Comment on lines +966 to +970
self.assertEqual(fr'\{{\}}', '\\{\\}')
self.assertEqual(fr'\{{', '\\{')
self.assertEqual(fr'\{{{1+1}', '\\{2')
self.assertEqual(fr'\}}{1+1}', '\\}2')
self.assertEqual(fr'{1+1}\}}', '2\\}')
Copy link
Member

Choose a reason for hiding this comment

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

fr strings are tested below. The invalid escape sequence tests are intentional.

I think you should catch the DeprecationWarning instead.

@serhiy-storchaka
Copy link
Member

It was already fixed in #104137.

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

Successfully merging this pull request may close these issues.

Fix DeprecationWarnings in test_fstring
5 participants