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

Method setUp

Lib/test/test_py_compile.py:230–236  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

228class PyCompileCLITestCase(unittest.TestCase):
229
230 def setUp(self):
231 self.directory = tempfile.mkdtemp()
232 self.source_path = os.path.join(self.directory, '_test.py')
233 self.cache_path = importlib.util.cache_from_source(self.source_path,
234 optimization='' if __debug__ else 1)
235 with open(self.source_path, 'w') as file:
236 file.write('x = 123\n')
237
238 def tearDown(self):
239 os_helper.rmtree(self.directory)

Callers

nothing calls this directly

Calls 4

mkdtempMethod · 0.80
openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected