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

Method test_CachedHTTPFile

numpy/lib/tests/test__datasource.py:307–316  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

305 assert_(self.repos.exists(valid_httpurl()))
306
307 def test_CachedHTTPFile(self):
308 localfile = valid_httpurl()
309 # Create a locally cached temp file with an URL based
310 # directory structure. This is similar to what Repository.open
311 # would do.
312 scheme, netloc, upath, pms, qry, frg = urlparse(localfile)
313 local_path = os.path.join(self.repos._destpath, netloc)
314 os.mkdir(local_path, 0o0700)
315 tmpfile = valid_textfile(local_path)
316 assert_(self.repos.exists(tmpfile))
317
318
319class TestOpenFunc:

Callers

nothing calls this directly

Calls 5

assert_Function · 0.90
valid_httpurlFunction · 0.85
valid_textfileFunction · 0.85
joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected