MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / get_temp_dir

Method get_temp_dir

tensorboard/test.py:36–52  ·  view source on GitHub ↗

Returns a unique temporary directory for the test to use. If you call this method multiple times during in a test, it will return the same folder. However, across different runs the directories will be different. This will ensure that across different runs tests will not be

(self)

Source from the content-addressed store, hash-verified

34 self._tempdir = None
35
36 def get_temp_dir(self):
37 """Returns a unique temporary directory for the test to use.
38
39 If you call this method multiple times during in a test, it will return the
40 same folder. However, across different runs the directories will be
41 different. This will ensure that across different runs tests will not be
42 able to pollute each others environment.
43 If you need multiple unique directories within a single test, you should
44 use `self.create_tempdir()`, provided by `absltest.TestCase`.
45 tempfile.mkdtemp(dir=self.get_temp_dir()):
46
47 Returns:
48 string, the path to the unique temporary directory created for this test.
49 """
50 if not self._tempdir:
51 self._tempdir = self.create_tempdir().full_path
52 return self._tempdir
53
54
55def main(*args, **kwargs):

Callers 5

test_audioMethod · 0.45
test_graph_defMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected