(typ, args, kwargs)
| 508 | ], |
| 509 | ) |
| 510 | def 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 | |
| 528 | def test_pickle_literals(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…