MCPcopy Index your code
hub / github.com/python/cpython / test_fstrings_complicated

Method test_fstrings_complicated

Lib/test/test_unparse.py:191–199  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189 self.check_ast_roundtrip('''f"""'end' "quote\\""""''')
190
191 def test_fstrings_complicated(self):
192 # See issue 28002
193 self.check_ast_roundtrip("""f'''{"'"}'''""")
194 self.check_ast_roundtrip('''f\'\'\'-{f"""*{f"+{f'.{x}.'}+"}*"""}-\'\'\'''')
195 self.check_ast_roundtrip('''f\'\'\'-{f"""*{f"+{f'.{x}.'}+"}*"""}-'single quote\\'\'\'\'''')
196 self.check_ast_roundtrip('f"""{\'\'\'\n\'\'\'}"""')
197 self.check_ast_roundtrip('f"""{g(\'\'\'\n\'\'\')}"""')
198 self.check_ast_roundtrip('''f"a\\r\\nb"''')
199 self.check_ast_roundtrip('''f"\\u2028{'x'}"''')
200
201 def test_fstrings_pep701(self):
202 self.check_ast_roundtrip('f" something { my_dict["key"] } something else "')

Callers

nothing calls this directly

Calls 1

check_ast_roundtripMethod · 0.80

Tested by

no test coverage detected