MCPcopy Index your code
hub / github.com/dask/dask / test_parse_namedtuple

Function test_parse_namedtuple

dask/tests/test_task_spec.py:510–525  ·  view source on GitHub ↗
(typ, args, kwargs)

Source from the content-addressed store, hash-verified

508 ],
509)
510def test_parse_namedtuple(typ, args, kwargs):
511 def func(x):
512 return x
513
514 obj = typ(*args, **kwargs)
515 t = Task("foo", func, parse_input(obj))
516
517 assert t() == obj
518
519 # The other test tuple do weird things to their input
520 if typ is PlainNamedTuple:
521 args = tuple([TaskRef("b")] + list(args)[1:])
522 obj = typ(*args, **kwargs)
523 t = Task("foo", func, parse_input(obj))
524 assert t.dependencies == {"b"}
525 assert t({"b": "foo"}) == typ(*tuple(["foo"] + list(args)[1:]), **kwargs)
526
527
528def test_pickle_literals():

Callers

nothing calls this directly

Calls 3

TaskClass · 0.90
parse_inputFunction · 0.90
TaskRefClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…