summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_abstract_numbers.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_abstract_numbers.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_abstract_numbers.py')
-rw-r--r--Lib/test/test_abstract_numbers.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/test/test_abstract_numbers.py b/Lib/test/test_abstract_numbers.py
index 19bfc79..0c1f28d 100644
--- a/Lib/test/test_abstract_numbers.py
+++ b/Lib/test/test_abstract_numbers.py
@@ -1,11 +1,12 @@
"""Unit tests for numbers.py."""
+import math
+import operator
import unittest
-from test import test_support
-from numbers import Number
-from numbers import Exact, Inexact
from numbers import Complex, Real, Rational, Integral
-import operator
+from numbers import Exact, Inexact
+from numbers import Number
+from test import test_support
class TestNumbers(unittest.TestCase):
def test_int(self):
@@ -49,8 +50,8 @@ class TestNumbers(unittest.TestCase):
self.failUnless(issubclass(complex, Inexact))
c1, c2 = complex(3, 2), complex(4,1)
- # XXX: This is not ideal, but see the comment in builtin_trunc().
- self.assertRaises(AttributeError, trunc, c1)
+ # XXX: This is not ideal, but see the comment in math_trunc().
+ self.assertRaises(AttributeError, math.trunc, c1)
self.assertRaises(TypeError, float, c1)
self.assertRaises(TypeError, int, c1)