diff options
Diffstat (limited to 'Lib/test/test_fractions.py')
-rw-r--r-- | Lib/test/test_fractions.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py index fc46e86..7fa9dbe 100644 --- a/Lib/test/test_fractions.py +++ b/Lib/test/test_fractions.py @@ -162,6 +162,7 @@ class FractionTest(unittest.TestCase): def testFromString(self): self.assertEqual((5, 1), _components(F("5"))) self.assertEqual((3, 2), _components(F("3/2"))) + self.assertEqual((3, 2), _components(F("3 / 2"))) self.assertEqual((3, 2), _components(F(" \n +3/2"))) self.assertEqual((-3, 2), _components(F("-3/2 "))) self.assertEqual((13, 2), _components(F(" 013/02 \n "))) @@ -191,9 +192,6 @@ class FractionTest(unittest.TestCase): ValueError, "Invalid literal for Fraction: '/2'", F, "/2") self.assertRaisesMessage( - ValueError, "Invalid literal for Fraction: '3 /2'", - F, "3 /2") - self.assertRaisesMessage( # Denominators don't need a sign. ValueError, "Invalid literal for Fraction: '3/+2'", F, "3/+2") |