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

Method setUp

Lib/test/test_inspect/test_inspect.py:1288–1297  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1286
1287class TestNoEOL(GetSourceBase):
1288 def setUp(self):
1289 self.tempdir = TESTFN + '_dir'
1290 os.mkdir(self.tempdir)
1291 with open(os.path.join(self.tempdir, 'inspect_fodder3%spy' % os.extsep),
1292 'w', encoding='utf-8') as f:
1293 f.write("class X:\n pass # No EOL")
1294 with DirsOnSysPath(self.tempdir):
1295 import inspect_fodder3 as mod3
1296 self.fodderModule = mod3
1297 super().setUp()
1298
1299 def tearDown(self):
1300 shutil.rmtree(self.tempdir)

Callers

nothing calls this directly

Calls 6

DirsOnSysPathClass · 0.90
superClass · 0.85
openFunction · 0.50
mkdirMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected