[3.14] gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908) (#136025)

gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908)
(cherry picked from commit f3aec60d7a)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2025-06-27 12:26:51 +02:00 committed by GitHub
parent a168c77536
commit 33c83cea07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 50 additions and 44 deletions

View file

@ -795,6 +795,8 @@ def test_format(self):
self.assertRaises(ValueError, format, x, '.6,n')
@support.requires_IEEE_754
@unittest.skipUnless(sys.float_repr_style == 'short',
"applies only when using short float repr style")
def test_format_testfile(self):
with open(format_testfile, encoding="utf-8") as testfile:
for line in testfile: