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

Function test_dot_graph

dask/tests/test_dot.py:232–246  ·  view source on GitHub ↗
(tmpdir, format, typ)

Source from the content-addressed store, hash-verified

230 ],
231)
232def test_dot_graph(tmpdir, format, typ):
233 # Use a name that the shell would interpret specially to ensure that we're
234 # not vulnerable to shell injection when interacting with `dot`.
235 filename = str(tmpdir.join("$(touch should_not_get_created.txt)"))
236
237 target = ".".join([filename, format])
238 ensure_not_exists(target)
239 try:
240 result = dot_graph(dsk, filename=filename, format=format)
241
242 assert not os.path.exists("should_not_get_created.txt")
243 assert os.path.isfile(target)
244 assert isinstance(result, typ)
245 finally:
246 ensure_not_exists(target)
247
248
249@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

ensure_not_existsFunction · 0.90
dot_graphFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…