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

Method test_debug_in_file

Lib/test/test_fstring.py:1760–1771  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1758 ])
1759
1760 def test_debug_in_file(self):
1761 with temp_cwd():
1762 script = 'script.py'
1763 with open('script.py', 'w') as f:
1764 f.write(f"""\
1765print(f'''{{
17663
1767=}}''')""")
1768
1769 _, stdout, _ = assert_python_ok(script)
1770 self.assertEqual(stdout.decode('utf-8').strip().replace('\r\n', '\n').replace('\r', '\n'),
1771 "3\n=3")
1772
1773 def test_syntax_warning_infinite_recursion_in_file(self):
1774 with temp_cwd():

Callers

nothing calls this directly

Calls 8

assertEqualMethod · 0.95
temp_cwdFunction · 0.90
assert_python_okFunction · 0.90
openFunction · 0.50
writeMethod · 0.45
replaceMethod · 0.45
stripMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected