summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-02-01 06:22:46 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2008-02-01 06:22:46 (GMT)
commitca2b69f765dd8a7f5c8e5c5346572519a8768ec4 (patch)
treee1a5f81f05f96d7f85313182316fdb070cfdf1bc /Lib/test/test_decimal.py
parent951cc0f474e4757e6954f0435952804211c5637c (diff)
downloadcpython-ca2b69f765dd8a7f5c8e5c5346572519a8768ec4.zip
cpython-ca2b69f765dd8a7f5c8e5c5346572519a8768ec4.tar.gz
cpython-ca2b69f765dd8a7f5c8e5c5346572519a8768ec4.tar.bz2
Move __builtins__.trunc() to math.trunc() per
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue 1965.
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 0ea4a36..0c8852c 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -25,10 +25,11 @@ with the corresponding argument.
"""
from __future__ import with_statement
-import unittest
import glob
+import math
import os, sys
import pickle, copy
+import unittest
from decimal import *
from test.test_support import (TestSkipped, run_unittest, run_doctest,
is_resource_enabled)
@@ -1225,7 +1226,7 @@ class DecimalPythonAPItests(unittest.TestCase):
# should work the same as to_integral in the ROUND_DOWN mode
d = Decimal(s)
r = d.to_integral(ROUND_DOWN)
- self.assertEqual(Decimal(trunc(d)), r)
+ self.assertEqual(Decimal(math.trunc(d)), r)
class ContextAPItests(unittest.TestCase):