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

Function write_file

Lib/test/test_reprlib.py:652–654  ·  view source on GitHub ↗
(path, text)

Source from the content-addressed store, hash-verified

650 self.assertEqual(aRepr.repr(t), "Type With Spaces")
651
652def write_file(path, text):
653 with open(path, 'w', encoding='ASCII') as fp:
654 fp.write(text)
655
656class LongReprTest(unittest.TestCase):
657 longname = 'areallylongpackageandmodulenametotestreprtruncation'

Callers 4

test_typeMethod · 0.70
test_classMethod · 0.70
test_instanceMethod · 0.70
test_methodMethod · 0.70

Calls 2

openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…