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

Method write_testfile

Lib/test/test_builtin.py:1690–1700  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1688 self.assertRaises(TypeError, oct, ())
1689
1690 def write_testfile(self):
1691 # NB the first 4 lines are also used to test input, below
1692 fp = open(TESTFN, 'w', encoding="utf-8")
1693 self.addCleanup(unlink, TESTFN)
1694 with fp:
1695 fp.write('1+1\n')
1696 fp.write('The quick brown fox jumps over the lazy dog')
1697 fp.write('.\n')
1698 fp.write('Dear John\n')
1699 fp.write('XXX'*100)
1700 fp.write('YYY'*100)
1701
1702 def test_open(self):
1703 self.write_testfile()

Callers 3

test_openMethod · 0.95
test_inputMethod · 0.95

Calls 3

addCleanupMethod · 0.80
openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected