MCPcopy Create free account
hub / github.com/tensorflow/datasets / _mock_open

Method _mock_open

tensorflow_datasets/testing/test_utils.py:214–215  ·  view source on GitHub ↗
(self, original_fn, p, mode='r', **kwargs)

Source from the content-addressed store, hash-verified

212 return self._to_tmp(path).read_text() # pytype: disable=attribute-error
213
214 def _mock_open(self, original_fn, p, mode='r', **kwargs):
215 return original_fn(self._to_tmp(p), mode, **kwargs)
216
217 def _mock_fn(self, original_fn, p, **kwargs):
218 return self._validate_out(original_fn(self._to_tmp(p), **kwargs))

Callers

nothing calls this directly

Calls 1

_to_tmpMethod · 0.95

Tested by

no test coverage detected