MCPcopy Index your code
hub / github.com/RustPython/RustPython / write_testfile

Method write_testfile

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

Source from the content-addressed store, hash-verified

1638 self.assertRaises(TypeError, oct, ())
1639
1640 def write_testfile(self):
1641 # NB the first 4 lines are also used to test input, below
1642 fp = open(TESTFN, 'w', encoding="utf-8")
1643 self.addCleanup(unlink, TESTFN)
1644 with fp:
1645 fp.write('1+1\n')
1646 fp.write('The quick brown fox jumps over the lazy dog')
1647 fp.write('.\n')
1648 fp.write('Dear John\n')
1649 fp.write('XXX'*100)
1650 fp.write('YYY'*100)
1651
1652 def test_open(self):
1653 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