MCPcopy Create free account
hub / github.com/dask/dask / myopen

Function myopen

dask/tests/test_system.py:115–118  ·  view source on GitHub ↗
(path, *args, **kwargs)

Source from the content-addressed store, hash-verified

113 builtin_open = builtins.open
114
115 def myopen(path, *args, **kwargs):
116 if path in paths:
117 return paths.get(path)
118 return builtin_open(path, *args, **kwargs)
119
120 monkeypatch.setattr(builtins, "open", myopen)
121 monkeypatch.setattr(sys, "platform", "linux")

Callers 2

test_to_textfilesFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected