mirror of
https://github.com/python/cpython.git
synced 2025-10-31 21:51:50 +00:00
[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:
parent
a168c77536
commit
33c83cea07
16 changed files with 50 additions and 44 deletions
|
|
@ -986,12 +986,12 @@ def test_add_section_default(self):
|
|||
|
||||
def test_defaults_keyword(self):
|
||||
"""bpo-23835 fix for ConfigParser"""
|
||||
cf = self.newconfig(defaults={1: 2.4})
|
||||
self.assertEqual(cf[self.default_section]['1'], '2.4')
|
||||
self.assertAlmostEqual(cf[self.default_section].getfloat('1'), 2.4)
|
||||
cf = self.newconfig(defaults={"A": 5.2})
|
||||
self.assertEqual(cf[self.default_section]['a'], '5.2')
|
||||
self.assertAlmostEqual(cf[self.default_section].getfloat('a'), 5.2)
|
||||
cf = self.newconfig(defaults={1: 2.5})
|
||||
self.assertEqual(cf[self.default_section]['1'], '2.5')
|
||||
self.assertAlmostEqual(cf[self.default_section].getfloat('1'), 2.5)
|
||||
cf = self.newconfig(defaults={"A": 5.25})
|
||||
self.assertEqual(cf[self.default_section]['a'], '5.25')
|
||||
self.assertAlmostEqual(cf[self.default_section].getfloat('a'), 5.25)
|
||||
|
||||
|
||||
class ConfigParserTestCaseNoInterpolation(BasicTestCase, unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue