MCPcopy Index your code
hub / github.com/ipython/ipython / mktmp

Method mktmp

IPython/testing/tools.py:272–278  ·  view source on GitHub ↗

Make a valid python temp file.

(self, src: str, ext: str='.py')

Source from the content-addressed store, hash-verified

270 Meant as a mixin class for test cases."""
271
272 def mktmp(self, src: str, ext: str='.py'):
273 """Make a valid python temp file."""
274 fname = temp_pyfile(src, ext)
275 if not hasattr(self, 'tmps'):
276 self.tmps=[]
277 self.tmps.append(fname)
278 self.fname = fname
279
280 def tearDown(self):
281 # If the tmpfile wasn't made because of skipped tests, like in

Callers 15

test_main_pathMethod · 0.80
test_main_path2Method · 0.80
test_exception_pathMethod · 0.80
test_exception_path2Method · 0.80
test_xdelMethod · 0.80
test_exit_code_signalMethod · 0.80
test_extraneous_loadsMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80

Calls 1

temp_pyfileFunction · 0.90

Tested by 15

test_main_pathMethod · 0.64
test_main_path2Method · 0.64
test_exception_pathMethod · 0.64
test_exception_path2Method · 0.64
test_xdelMethod · 0.64
test_exit_code_signalMethod · 0.64
test_extraneous_loadsMethod · 0.64
setUpMethod · 0.64
setUpMethod · 0.64