MCPcopy Index your code
hub / github.com/tensorflow/datasets / read_file

Method read_file

tensorflow_datasets/testing/test_utils.py:211–212  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

209 fpath.write_text(content) # pytype: disable=attribute-error
210
211 def read_file(self, path) -> str:
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)

Callers 4

test_mock_fsFunction · 0.95
test_publish_dataFunction · 0.80
_load_exampleFunction · 0.80

Calls 2

_to_tmpMethod · 0.95
read_textMethod · 0.80

Tested by

no test coverage detected