MCPcopy Index your code
hub / github.com/numpy/numpy / test_CachedHTTPFile

Method test_CachedHTTPFile

numpy/lib/tests/test__datasource.py:290–300  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

288 assert_(repos.exists(valid_httpurl()))
289
290 def test_CachedHTTPFile(self, tmp_path):
291 localfile = valid_httpurl()
292 # Create a locally cached temp file with a URL based
293 # directory structure. This is similar to what Repository.open
294 # would do.
295 repos = datasource.Repository(valid_baseurl(), tmp_path)
296 _, netloc, _, _, _, _ = urlparse(localfile)
297 local_path = os.path.join(repos._destpath, netloc)
298 os.mkdir(local_path, 0o0700)
299 tmpfile = valid_textfile(local_path)
300 assert_(repos.exists(tmpfile))
301
302
303class TestOpenFunc:

Callers

nothing calls this directly

Calls 6

existsMethod · 0.95
assert_Function · 0.90
valid_httpurlFunction · 0.85
valid_baseurlFunction · 0.85
valid_textfileFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected