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
0a001f86
Commit
0a001f86
authored
Aug 17, 2010
by
Nick Coghlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore the exact ID value for the nested function in the dis.code_info tests
parent
f15f8410
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
Lib/test/test_dis.py
Lib/test/test_dis.py
+3
-4
No files found.
Lib/test/test_dis.py
View file @
0a001f86
...
...
@@ -259,7 +259,7 @@ Stack size: 7
Flags: OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
Constants:
0: None
1: <code object f at
{1}, file "{0}", line {2
}>
1: <code object f at
(.*), file "{0}", line {1
}>
Variable names:
0: x
1: y
...
...
@@ -276,7 +276,6 @@ Cell variables:
3: y
4: x
5: z"""
.
format
(
__file__
,
hex
(
id
(
co_tricky_nested_f
)),
co_tricky_nested_f
.
co_firstlineno
)
code_info_tricky_nested_f
=
"""
\
...
...
@@ -356,14 +355,14 @@ class CodeInfoTests(unittest.TestCase):
def
test_code_info
(
self
):
self
.
maxDiff
=
1000
for
x
,
expected
in
self
.
test_pairs
:
self
.
assert
Equal
(
dis
.
code_info
(
x
),
expected
)
self
.
assert
RegexpMatches
(
dis
.
code_info
(
x
),
expected
)
def
test_show_code
(
self
):
self
.
maxDiff
=
1000
for
x
,
expected
in
self
.
test_pairs
:
with
captured_stdout
()
as
output
:
dis
.
show_code
(
x
)
self
.
assert
Equal
(
output
.
getvalue
(),
expected
+
"
\
n
"
)
self
.
assert
RegexpMatches
(
output
.
getvalue
(),
expected
+
"
\
n
"
)
def
test_main
():
run_unittest
(
DisTests
,
CodeInfoTests
)
...
...
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