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

Method test_sandboxing

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

Source from the content-addressed store, hash-verified

267 assert_equal(local_path, filepath)
268
269 def test_sandboxing(self):
270 tmp_path = lambda x: os.path.abspath(self.repos.abspath(x))
271 assert_(tmp_path(valid_httpfile()).startswith(self.tmpdir))
272 for fn in malicious_files:
273 assert_(tmp_path(http_path+fn).startswith(self.tmpdir))
274 assert_(tmp_path(fn).startswith(self.tmpdir))
275
276 def test_windows_os_sep(self):
277 orig_os_sep = os.sep

Callers 1

test_windows_os_sepMethod · 0.95

Calls 4

assert_Function · 0.90
valid_httpfileFunction · 0.85
startswithMethod · 0.80
abspathMethod · 0.45

Tested by

no test coverage detected