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
5fc570fc
Commit
5fc570fc
authored
Jul 07, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl.
parent
668af7e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
Lib/test/test_tcl.py
Lib/test/test_tcl.py
+2
-6
No files found.
Lib/test/test_tcl.py
View file @
5fc570fc
...
@@ -420,11 +420,9 @@ class TclTest(unittest.TestCase):
...
@@ -420,11 +420,9 @@ class TclTest(unittest.TestCase):
self
.
assertEqual
(
passValue
(
float
(
'inf'
)),
float
(
'inf'
))
self
.
assertEqual
(
passValue
(
float
(
'inf'
)),
float
(
'inf'
))
self
.
assertEqual
(
passValue
(
-
float
(
'inf'
)),
-
float
(
'inf'
))
self
.
assertEqual
(
passValue
(
-
float
(
'inf'
)),
-
float
(
'inf'
))
else
:
else
:
f
=
passValue
(
float
(
'nan'
))
self
.
assertIsInstance
(
f
,
str
)
self
.
assertEqual
(
f
.
lower
()[:
3
],
'nan'
)
self
.
assertEqual
(
float
(
passValue
(
float
(
'inf'
))),
float
(
'inf'
))
self
.
assertEqual
(
float
(
passValue
(
float
(
'inf'
))),
float
(
'inf'
))
self
.
assertEqual
(
float
(
passValue
(
-
float
(
'inf'
))),
-
float
(
'inf'
))
self
.
assertEqual
(
float
(
passValue
(
-
float
(
'inf'
))),
-
float
(
'inf'
))
# XXX NaN representation can be not parsable by float()
self
.
assertEqual
(
passValue
((
1
,
'2'
,
(
3.4
,))),
self
.
assertEqual
(
passValue
((
1
,
'2'
,
(
3.4
,))),
(
1
,
'2'
,
(
3.4
,))
if
self
.
wantobjects
else
'1 2 3.4'
)
(
1
,
'2'
,
(
3.4
,))
if
self
.
wantobjects
else
'1 2 3.4'
)
...
@@ -449,8 +447,6 @@ class TclTest(unittest.TestCase):
...
@@ -449,8 +447,6 @@ class TclTest(unittest.TestCase):
expected
=
float
(
expected
)
expected
=
float
(
expected
)
self
.
assertAlmostEqual
(
float
(
actual
),
expected
,
self
.
assertAlmostEqual
(
float
(
actual
),
expected
,
delta
=
abs
(
expected
)
*
1e-10
)
delta
=
abs
(
expected
)
*
1e-10
)
def
starts_with
(
actual
,
expected
):
self
.
assertEqual
(
actual
.
lower
()[:
len
(
expected
)],
expected
)
check
(
True
,
'1'
)
check
(
True
,
'1'
)
check
(
False
,
'0'
)
check
(
False
,
'0'
)
...
@@ -474,7 +470,7 @@ class TclTest(unittest.TestCase):
...
@@ -474,7 +470,7 @@ class TclTest(unittest.TestCase):
check
(
f
,
f
,
eq
=
float_eq
)
check
(
f
,
f
,
eq
=
float_eq
)
check
(
float
(
'inf'
),
'Inf'
,
eq
=
float_eq
)
check
(
float
(
'inf'
),
'Inf'
,
eq
=
float_eq
)
check
(
-
float
(
'inf'
),
'-Inf'
,
eq
=
float_eq
)
check
(
-
float
(
'inf'
),
'-Inf'
,
eq
=
float_eq
)
check
(
float
(
'nan'
),
'nan'
,
eq
=
starts_with
)
# XXX NaN representation can be not parsable by float(
)
check
((),
''
)
check
((),
''
)
check
((
1
,
(
2
,),
(
3
,
4
),
'5 6'
,
()),
'1 2 {3 4} {5 6} {}'
)
check
((
1
,
(
2
,),
(
3
,
4
),
'5 6'
,
()),
'1 2 {3 4} {5 6} {}'
)
...
...
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