Lines Matching refs:check_roundtrip
82 def check_roundtrip(self, code1, filename="internal"): member in ASTTestCase
94 self.check_roundtrip("del x, y, z")
97 self.check_roundtrip("45 << 2")
98 self.check_roundtrip("13 >> 7")
101 self.check_roundtrip(for_else)
104 self.check_roundtrip(while_else)
107 self.check_roundtrip("(-1)**7")
108 self.check_roundtrip("(-1.)**8")
109 self.check_roundtrip("(-1j)**6")
110 self.check_roundtrip("not True or False")
111 self.check_roundtrip("True or not False")
114 self.check_roundtrip("3 .__abs__()")
117 self.check_roundtrip("1e1000")
118 self.check_roundtrip("-1e1000")
119 self.check_roundtrip("1e1000j")
120 self.check_roundtrip("-1e1000j")
123 self.check_roundtrip(str(-sys.maxint-1))
124 self.check_roundtrip("-(%s)" % (sys.maxint + 1))
127 self.check_roundtrip("7j")
128 self.check_roundtrip("-7j")
129 self.check_roundtrip("-(7j)")
130 self.check_roundtrip("0j")
131 self.check_roundtrip("-0j")
132 self.check_roundtrip("-(0j)")
135 self.check_roundtrip("-0")
136 self.check_roundtrip("-(0)")
137 self.check_roundtrip("-0b0")
138 self.check_roundtrip("-(0b0)")
139 self.check_roundtrip("-0o0")
140 self.check_roundtrip("-(0o0)")
141 self.check_roundtrip("-0x0")
142 self.check_roundtrip("-(0x0)")
145 self.check_roundtrip("(lambda: int)()")
148 self.check_roundtrip("1 < 4 <= 5")
149 self.check_roundtrip("a is b is c is not d")
152 self.check_roundtrip("def f(): pass")
153 self.check_roundtrip("def f(a): pass")
154 self.check_roundtrip("def f(b = 2): pass")
155 self.check_roundtrip("def f(a, b): pass")
156 self.check_roundtrip("def f(a, b = 2): pass")
157 self.check_roundtrip("def f(a = 5, b = 2): pass")
158 self.check_roundtrip("def f(*args, **kwargs): pass")
161 self.check_roundtrip(relative_import)
164 self.check_roundtrip("b'123'")
167 self.check_roundtrip("{'a', 'b', 'c'}")
170 self.check_roundtrip("{x for x in range(5)}")
173 self.check_roundtrip("{x: x*x for x in range(10)}")
176 self.check_roundtrip(class_decorator)
179 self.check_roundtrip(elif1)
180 self.check_roundtrip(elif2)
183 self.check_roundtrip(try_except_finally)
206 self.check_roundtrip(source)