MCPcopy Create free account
hub / github.com/ipython/ipython / mktmp

Method mktmp

IPython/testing/tools.py:271–277  ·  view source on GitHub ↗

Make a valid python temp file.

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

Source from the content-addressed store, hash-verified

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

Callers 15

setUpMethod · 0.80
test_xdelMethod · 0.80
test_exit_code_signalMethod · 0.80
test_extraneous_loadsMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
test_simpledefMethod · 0.80
test_obj_delMethod · 0.80

Calls 1

temp_pyfileFunction · 0.90

Tested by 15

setUpMethod · 0.64
test_xdelMethod · 0.64
test_exit_code_signalMethod · 0.64
test_extraneous_loadsMethod · 0.64
setUpMethod · 0.64
setUpMethod · 0.64
test_simpledefMethod · 0.64
test_obj_delMethod · 0.64