[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
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

bpo-41681 Fixed mistake in test for f-string/str.format error description (GH-22036) #22059

Merged
merged 1 commit into from Sep 2, 2020

Conversation

Copy link
Contributor

millefalcon commented Sep 2, 2020

@ericvsmith Fixed mistake in two of the error description test for f-string/str.format.

def test_with_an_underscore_and_a_comma_in_format_specifier(self):
    error_msg = re.escape("Cannot specify both ',' and '_'.")
    with self.assertRaisesRegex(ValueError, error_msg):
        '{:,_}'.format(1)

Should have been,

def test_with_an_underscore_and_a_comma_in_format_specifier(self):
    error_msg = re.escape("Cannot specify both ',' and '_'.")
    with self.assertRaisesRegex(ValueError, error_msg):
        '{:_,}'.format(1)

And

def test_with_an_underscore_and_a_comma_in_format_specifier(self):
    error_msg = re.escape("Cannot specify both ',' and '_'.")
    with self.assertRaisesRegex(ValueError, error_msg):
        f'{1:,_}'

Should have been,

def test_with_an_underscore_and_a_comma_in_format_specifier(self):
    error_msg = re.escape("Cannot specify both ',' and '_'.")
    with self.assertRaisesRegex(ValueError, error_msg):
        f'{1:_,}'

https://bugs.python.org/issue41681

ericvsmith merged commit 749ed85 into python:master Sep 2, 2020
3 checks passed
Copy link
Contributor

miss-islington commented Sep 2, 2020

Thanks @millefalcon for the PR, and @ericvsmith for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 2, 2020
…pythonGH-22059)

(cherry picked from commit 749ed85)

Co-authored-by: han-solo <hanish0019@gmail.com>
Copy link

bedevere-bot commented Sep 2, 2020

GH-22060 is a backport of this pull request to the 3.9 branch.

ericvsmith pushed a commit that referenced this pull request Sep 2, 2020
…2059) (GH-22060)

(cherry picked from commit 749ed85)

Co-authored-by: han-solo <hanish0019@gmail.com>

Co-authored-by: han-solo <hanish0019@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants