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

Method setUp

Lib/test/test_configparser.py:1056–1064  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1054 "spam spam and spam!").replace(' ', '\t\n')
1055
1056 def setUp(self):
1057 cf = self.newconfig()
1058 for i in range(100):
1059 s = 'section{}'.format(i)
1060 cf.add_section(s)
1061 for j in range(10):
1062 cf.set(s, 'lovely_spam{}'.format(j), self.wonderful_spam)
1063 with open(os_helper.TESTFN, 'w', encoding="utf-8") as f:
1064 cf.write(f)
1065
1066 def tearDown(self):
1067 os.unlink(os_helper.TESTFN)

Callers

nothing calls this directly

Calls 6

openFunction · 0.50
newconfigMethod · 0.45
formatMethod · 0.45
add_sectionMethod · 0.45
setMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected