diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2025-06-27 10:26:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-27 10:26:51 (GMT) |
commit | 33c83cea070b70416c4a40a79130866ff7df679f (patch) | |
tree | f2a0dcdc1c1305745d14312455eb5fe4b8852662 /Lib/test/test_pprint.py | |
parent | a168c775366d09b37492854f1a376f7b250fcf40 (diff) | |
download | cpython-33c83cea070b70416c4a40a79130866ff7df679f.zip cpython-33c83cea070b70416c4a40a79130866ff7df679f.tar.gz cpython-33c83cea070b70416c4a40a79130866ff7df679f.tar.bz2 |
[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 f3aec60d7a01c5f085a3ef2d6670d46b42b8ddd3)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/test_pprint.py')
-rw-r--r-- | Lib/test/test_pprint.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py index f68996f..403d2e9 100644 --- a/Lib/test/test_pprint.py +++ b/Lib/test/test_pprint.py @@ -380,7 +380,7 @@ class QueryTestCase(unittest.TestCase): return super().__new__(Temperature, celsius_degrees) def __repr__(self): kelvin_degrees = self + 273.15 - return f"{kelvin_degrees}°K" + return f"{kelvin_degrees:.2f}°K" self.assertEqual(pprint.pformat(Temperature(1000)), '1273.15°K') def test_sorted_dict(self): |