meshed.tests.utils_for_testing

Make objects for testing fast

meshed.tests.utils_for_testing.string_to_dag(dot_string)[source]
>>> dot_string = '''
... a, b, c -> d -> e
... b, f -> g -> h
... a, e -> i -> j
... '''
>>> dag = string_to_dag(dot_string)
>>> print(dag.synopsis_string())
a,b,c -> d -> e
b,f -> g -> h
a,e -> i -> j
>>> Sig(dag)
<Sig (a, b, c, f)>
>>> sorted(dag(1,2,3,4))
['g(b=2, f=4)', 'i(a=1, e=d(a=1, b=2, c=3))']