MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / test_visualization

Function test_visualization

tests/pyapi/test_visualization.py:9–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8
9def test_visualization():
10 def fn():
11 pass
12
13 job = Job()
14 a = job.function(fn, name="a")
15 b1 = job.function(fn, name="b1", deps=[a])
16 b2 = job.function(fn, name="b2", deps=[a])
17 c1 = job.function(fn, name="c1", deps=[b1])
18 c2 = job.function(fn, name="c2", deps=[b2])
19 job.function(fn, name="d", deps=[c1, c2])
20
21 with NamedTemporaryFile() as f:
22 visualize_job(job, f.name)
23 check_file_contents(
24 f.name,
25 """digraph job {
26a;
27b1;
28a -> b1;
29b2;
30a -> b2;
31c1;
32b1 -> c1;
33c2;
34b2 -> c2;
35d;
36c1 -> d;
37c2 -> d;
38}
39""",
40 )

Callers

nothing calls this directly

Calls 4

functionMethod · 0.95
JobClass · 0.90
visualize_jobFunction · 0.90
check_file_contentsFunction · 0.50

Tested by

no test coverage detected