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

Method test_InvalidHTTP

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

Source from the content-addressed store, hash-verified

96 fh.close()
97
98 def test_InvalidHTTP(self, tmp_path):
99 ds = datasource.DataSource(tmp_path)
100 url = invalid_httpurl()
101 assert_raises(OSError, ds.open, url)
102 try:
103 ds.open(url)
104 except OSError as e:
105 # Regression test for bug fixed in r4342.
106 assert_(e.errno is None)
107
108 def test_InvalidHTTPCacheURLError(self, tmp_path):
109 ds = datasource.DataSource(tmp_path)

Callers

nothing calls this directly

Calls 4

openMethod · 0.95
assert_raisesFunction · 0.90
assert_Function · 0.90
invalid_httpurlFunction · 0.85

Tested by

no test coverage detected