MCPcopy Create free account
hub / github.com/python/cpython / restore_files

Method restore_files

Lib/test/libregrtest/save_env.py:274–280  ·  view source on GitHub ↗
(self, saved_value)

Source from the content-addressed store, hash-verified

272 for fn in os.listdir()
273 if not fn.startswith(".hypothesis"))
274 def restore_files(self, saved_value):
275 fn = os_helper.TESTFN
276 if fn not in saved_value and (fn + '/') not in saved_value:
277 if os.path.isfile(fn):
278 os_helper.unlink(fn)
279 elif os.path.isdir(fn):
280 os_helper.rmtree(fn)
281
282 _lc = [getattr(locale, lc) for lc in dir(locale)
283 if lc.startswith('LC_')]

Callers

nothing calls this directly

Calls 3

isfileMethod · 0.45
unlinkMethod · 0.45
isdirMethod · 0.45

Tested by

no test coverage detected