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

Method _mock

tensorflow_datasets/testing/test_utils.py:239–254  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

237 yield (self._to_abs(root, state=state), subdirs, filenames)
238
239 def _mock(self):
240 return mock_gfile(
241 exists=self._mock_fn,
242 listdir=self._mock_fn,
243 isdir=self._mock_fn,
244 remove=self._mock_fn,
245 rmtree=self._mock_fn,
246 mkdir=self._mock_fn,
247 makedirs=self._mock_fn,
248 open=self._mock_open,
249 rename=self._mock_fn_2_args,
250 replace=self._mock_fn_2_args,
251 copy=self._mock_fn_2_args,
252 glob=self._mock_glob,
253 walk=self._mock_walk,
254 )
255
256 def print_tree(self) -> None:
257 print(_get_folder_str(self._tmp_dir))

Callers 1

mockMethod · 0.95

Calls 1

mock_gfileFunction · 0.85

Tested by

no test coverage detected