Home
last modified time | relevance | path

Searched refs:check_roundtrip (Results 1 – 3 of 3) sorted by relevance

/external/python/cpython3/Lib/test/test_tools/
Dtest_unparse.py126 def check_roundtrip(self, code1, filename="internal"): member in ASTTestCase
139 self.check_roundtrip(r"""f'{f"{0}"*3}'""")
140 self.check_roundtrip(r"""f'{f"{y}"*3}'""")
143 self.check_roundtrip("del x, y, z")
146 self.check_roundtrip("45 << 2")
147 self.check_roundtrip("13 >> 7")
150 self.check_roundtrip(for_else)
153 self.check_roundtrip(while_else)
156 self.check_roundtrip("(-1)**7")
157 self.check_roundtrip("(-1.)**8")
[all …]
/external/python/cpython2/Demo/parser/
Dtest_unparse.py82 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")
[all …]
/external/python/cpython2/Lib/test/
Dtest_tokenize.py614 def check_roundtrip(self, f): member in TestRoundtrip
633 self.check_roundtrip("if x == 1:\n"
638 self.check_roundtrip("if x == 1:\n"
640 self.check_roundtrip("# This is a comment\n"
648 self.check_roundtrip("if x == 1 : \n"
652 self.check_roundtrip(f)
653 self.check_roundtrip("if x == 1:\n"
658 self.check_roundtrip("if (x # The comments need to go in the right place\n"
661 self.check_roundtrip("class Test: # A comment here\n"
670 self.check_roundtrip("try: import somemodule\n"
[all …]