summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fractions.py
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-03-21 17:25:23 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-03-21 17:25:23 (GMT)
commit1919b7e72bc43315b32f38a6f5f01e8c717907f4 (patch)
treeef7490b66425fd2c622740ef9adfb03d806b7517 /Lib/test/test_fractions.py
parent8bfccd852e2bceb04664b4832fc80eb3b7584918 (diff)
downloadcpython-1919b7e72bc43315b32f38a6f5f01e8c717907f4.zip
cpython-1919b7e72bc43315b32f38a6f5f01e8c717907f4.tar.gz
cpython-1919b7e72bc43315b32f38a6f5f01e8c717907f4.tar.bz2
Issue #7652: Integrate the decimal floating point libmpdec library to speed
up the decimal module. Performance gains of the new C implementation are between 12x and 80x, depending on the application.
Diffstat (limited to 'Lib/test/test_fractions.py')
-rw-r--r--Lib/test/test_fractions.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index 084ae0c..1fad921 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -401,14 +401,10 @@ class FractionTest(unittest.TestCase):
def testMixingWithDecimal(self):
# 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.assertRaisesMessage(
- TypeError,
- "unsupported operand type(s) for +: 'Decimal' and 'Fraction'",
- operator.add, Decimal('3.1415926'), F(3,11))
+ self.assertRaises(TypeError, operator.add,
+ F(3,11), Decimal('3.1415926'))
+ self.assertRaises(TypeError, operator.add,
+ Decimal('3.1415926'), F(3,11))
def testComparisons(self):
self.assertTrue(F(1, 2) < F(2, 3))