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

Function check_valid_file

Lib/test/support/__init__.py:765–772  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

763 fn = os.path.join(TEST_DATA_DIR, filename)
764
765 def check_valid_file(fn):
766 f = open(fn, *args, **kw)
767 if check is None:
768 return f
769 elif check(f):
770 f.seek(0)
771 return f
772 f.close()
773
774 if os.path.exists(fn):
775 f = check_valid_file(fn)

Callers 1

open_urlresourceFunction · 0.85

Calls 4

openFunction · 0.50
checkFunction · 0.50
seekMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected