Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
670048de
Commit
670048de
authored
Aug 03, 2010
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecation warnings in test_long_future.py
parent
aad15414
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/test/test_long_future.py
Lib/test/test_long_future.py
+4
-3
No files found.
Lib/test/test_long_future.py
View file @
670048de
...
...
@@ -4,7 +4,7 @@ from __future__ import division
# trick just part of test_long into using future division.
import
unittest
from
test.test_support
import
run_unittest
from
test.test_support
import
run_unittest
,
_check_py3k_warnings
class
TrueDivisionTests
(
unittest
.
TestCase
):
def
test
(
self
):
...
...
@@ -44,6 +44,7 @@ class TrueDivisionTests(unittest.TestCase):
self
.
assertEqual
(
result
,
0.0
,
"expected underflow to 0 from %r"
%
underflow
)
with
_check_py3k_warnings
((
'classic long division'
,
DeprecationWarning
)):
for
zero
in
[
"huge / 0"
,
"huge / 0L"
,
"mhuge / 0"
,
"mhuge / 0L"
]:
self
.
assertRaises
(
ZeroDivisionError
,
eval
,
zero
,
namespace
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment