summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fractions.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-06-11 10:44:52 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-06-11 10:44:52 (GMT)
commit08ade6faa0369a9167d150a1d85265b1a9ea58ef (patch)
tree287b48886b2f9dc890875d08dba06d200d7468d9 /Lib/test/test_fractions.py
parentbfd73faf86cc0dc82754372d96318f95c43170c5 (diff)
downloadcpython-08ade6faa0369a9167d150a1d85265b1a9ea58ef.zip
cpython-08ade6faa0369a9167d150a1d85265b1a9ea58ef.tar.gz
cpython-08ade6faa0369a9167d150a1d85265b1a9ea58ef.tar.bz2
Issue #8188: Comparisons between Decimal objects and other numeric
objects (Fraction, float, complex, int) now all function as expected.
Diffstat (limited to 'Lib/test/test_fractions.py')
-rw-r--r--Lib/test/test_fractions.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index dd51f9b..a41fd9c 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -395,12 +395,11 @@ class FractionTest(unittest.TestCase):
self.assertTypedEquals(1.0 + 0j, (1.0 + 0j) ** F(1, 10))
def testMixingWithDecimal(self):
- # Decimal refuses mixed comparisons.
+ # Decimal refuses mixed arithmetic (but not mixed comparisons)
self.assertRaisesMessage(
TypeError,
"unsupported operand type(s) for +: 'Fraction' and 'Decimal'",
operator.add, F(3,11), Decimal('3.1415926'))
- self.assertNotEquals(F(5, 2), Decimal('2.5'))
def testComparisons(self):
self.assertTrue(F(1, 2) < F(2, 3))