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
df4bb464
Commit
df4bb464
authored
Feb 07, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #17118: Add new tests for testing Python-Tcl interaction.
parent
89953002
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Lib/test/test_tcl.py
Lib/test/test_tcl.py
+20
-0
No files found.
Lib/test/test_tcl.py
View file @
df4bb464
...
...
@@ -151,6 +151,26 @@ class TclTest(unittest.TestCase):
# exit code must be zero
self
.
assertEqual
(
f
.
close
(),
None
)
def
test_passing_values
(
self
):
def
passValue
(
value
):
return
self
.
interp
.
call
(
'set'
,
'_'
,
value
)
self
.
assertEqual
(
passValue
(
True
),
True
)
self
.
assertEqual
(
passValue
(
False
),
False
)
self
.
assertEqual
(
passValue
(
'string'
),
'string'
)
self
.
assertEqual
(
passValue
(
'string
\
u20ac
'
),
'string
\
u20ac
'
)
for
i
in
(
0
,
1
,
-
1
,
2
**
31
-
1
,
-
2
**
31
):
self
.
assertEqual
(
passValue
(
i
),
i
)
for
f
in
(
0.0
,
1.0
,
-
1.0
,
1
/
3
,
sys
.
float_info
.
min
,
sys
.
float_info
.
max
,
-
sys
.
float_info
.
min
,
-
sys
.
float_info
.
max
):
self
.
assertEqual
(
passValue
(
f
),
f
)
for
f
in
float
(
'nan'
),
float
(
'inf'
),
-
float
(
'inf'
):
if
f
!=
f
:
# NaN
self
.
assertNotEqual
(
passValue
(
f
),
f
)
else
:
self
.
assertEqual
(
passValue
(
f
),
f
)
self
.
assertEqual
(
passValue
((
1
,
'2'
,
(
3.4
,))),
(
1
,
'2'
,
(
3.4
,)))
def
test_main
():
...
...
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