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

Function data_file

Lib/test/test_asyncio/utils.py:44–51  ·  view source on GitHub ↗
(*filename)

Source from the content-addressed store, hash-verified

42
43
44def data_file(*filename):
45 fullname = os.path.join(support.TEST_HOME_DIR, *filename)
46 if os.path.isfile(fullname):
47 return fullname
48 fullname = os.path.join(os.path.dirname(__file__), '..', *filename)
49 if os.path.isfile(fullname):
50 return fullname
51 raise FileNotFoundError(os.path.join(filename))
52
53
54ONLYCERT = data_file('certdata', 'ssl_cert.pem')

Callers 1

utils.pyFile · 0.70

Calls 3

joinMethod · 0.45
isfileMethod · 0.45
dirnameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…