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

Function test_dot_graph

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

Source from the content-addressed store, hash-verified

253 strict=False,
254)
255def test_dot_graph(tmpdir, format, typ):
256 # Use a name that the shell would interpret specially to ensure that we're
257 # not vulnerable to shell injection when interacting with `dot`.
258 filename = str(tmpdir.join("$(touch should_not_get_created.txt)"))
259
260 target = ".".join([filename, format])
261 ensure_not_exists(target)
262 try:
263 result = dot_graph(dsk, filename=filename, format=format)
264
265 assert not os.path.exists("should_not_get_created.txt")
266 assert os.path.isfile(target)
267 assert isinstance(result, typ)
268 finally:
269 ensure_not_exists(target)
270
271
272@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