mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Move __builtins__.trunc() to math.trunc() per
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue 1965.
This commit is contained in:
parent
951cc0f474
commit
ca2b69f765
9 changed files with 72 additions and 70 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue