Kaydet (Commit) 46e63805 authored tarafından Nick Coghlan's avatar Nick Coghlan

Another attempt at pacifying the windows buildbots by ignoring all the variable…

Another attempt at pacifying the windows buildbots by ignoring all the variable information in the dis.code_info tests
üst 09c8123e
...@@ -213,7 +213,7 @@ class DisTests(unittest.TestCase): ...@@ -213,7 +213,7 @@ class DisTests(unittest.TestCase):
code_info_code_info = """\ code_info_code_info = """\
Name: code_info Name: code_info
Filename: {0} Filename: (.*)
Argument count: 1 Argument count: 1
Kw-only arguments: 0 Kw-only arguments: 0
Number of locals: 1 Number of locals: 1
...@@ -239,7 +239,7 @@ Names: ...@@ -239,7 +239,7 @@ Names:
8: type 8: type
9: __name__ 9: __name__
Variable names: Variable names:
0: x""".format(dis.__file__) 0: x"""
@staticmethod @staticmethod
def tricky(x, y, z=True, *args, c, d, e=[], **kwds): def tricky(x, y, z=True, *args, c, d, e=[], **kwds):
...@@ -247,11 +247,9 @@ def tricky(x, y, z=True, *args, c, d, e=[], **kwds): ...@@ -247,11 +247,9 @@ def tricky(x, y, z=True, *args, c, d, e=[], **kwds):
print(x, y, z, c, d, e, f) print(x, y, z, c, d, e, f)
yield x, y, z, c, d, e, f yield x, y, z, c, d, e, f
co_tricky_nested_f = tricky.__func__.__code__.co_consts[1]
code_info_tricky = """\ code_info_tricky = """\
Name: tricky Name: tricky
Filename: {0} Filename: (.*)
Argument count: 3 Argument count: 3
Kw-only arguments: 3 Kw-only arguments: 3
Number of locals: 8 Number of locals: 8
...@@ -259,7 +257,7 @@ Stack size: 7 ...@@ -259,7 +257,7 @@ Stack size: 7
Flags: OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR Flags: OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
Constants: Constants:
0: None 0: None
1: <code object f at (.*), file "{0}", line {1}> 1: <code object f at (.*), file "(.*)", line (.*)>
Variable names: Variable names:
0: x 0: x
1: y 1: y
...@@ -275,12 +273,13 @@ Cell variables: ...@@ -275,12 +273,13 @@ Cell variables:
2: f 2: f
3: y 3: y
4: x 4: x
5: z""".format(__file__, 5: z"""
co_tricky_nested_f.co_firstlineno)
co_tricky_nested_f = tricky.__func__.__code__.co_consts[1]
code_info_tricky_nested_f = """\ code_info_tricky_nested_f = """\
Name: f Name: f
Filename: {0} Filename: (.*)
Argument count: 1 Argument count: 1
Kw-only arguments: 0 Kw-only arguments: 0
Number of locals: 1 Number of locals: 1
...@@ -298,7 +297,7 @@ Free variables: ...@@ -298,7 +297,7 @@ Free variables:
2: f 2: f
3: y 3: y
4: x 4: x
5: z""".format(__file__) 5: z"""
code_info_expr_str = """\ code_info_expr_str = """\
Name: <module> Name: <module>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment