mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
e23518fa96
commit
f3aec60d7a
16 changed files with 50 additions and 44 deletions
|
@ -458,7 +458,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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue