MCPcopy Index your code
hub / github.com/python/cpython / check_valid_file

Function check_valid_file

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

Source from the content-addressed store, hash-verified

851 fn = os.path.join(TEST_DATA_DIR, filename)
852
853 def check_valid_file(fn):
854 f = open(fn, *args, **kw)
855 if check is None:
856 return f
857 elif check(f):
858 f.seek(0)
859 return f
860 f.close()
861
862 if os.path.exists(fn):
863 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…