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

Function urlopen_stub

numpy/lib/tests/test__datasource.py:14–20  ·  view source on GitHub ↗

Stub to replace urlopen for testing.

(url, data=None)

Source from the content-addressed store, hash-verified

12
13
14def urlopen_stub(url, data=None):
15 '''Stub to replace urlopen for testing.'''
16 if url == valid_httpurl():
17 tmpfile = NamedTemporaryFile(prefix='urltmp_')
18 return tmpfile
19 else:
20 raise URLError('Name or service not known')
21
22
23# setup and teardown

Callers

nothing calls this directly

Calls 1

valid_httpurlFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…