MCPcopy Create free account
hub / github.com/numpy/numpy / valid_textfile

Function valid_textfile

numpy/lib/tests/test__datasource.py:50–54  ·  view source on GitHub ↗
(filedir)

Source from the content-addressed store, hash-verified

48
49# Utility functions used by many tests
50def valid_textfile(filedir):
51 # Generate and return a valid temporary file.
52 fd, path = mkstemp(suffix='.txt', prefix='dstmp_', dir=filedir, text=True)
53 os.close(fd)
54 return path
55
56
57def invalid_textfile(filedir):

Callers 8

test_ValidFileMethod · 0.85
test_ValidFileMethod · 0.85
test_ValidFileMethod · 0.85
test_InvalidFileMethod · 0.85
test_sandboxingMethod · 0.85
test_ValidFileMethod · 0.85
test_CachedHTTPFileMethod · 0.85
test_DataSourceOpenMethod · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected