I don't understand `run_rule_with_mocks` enough. I...
# development
b
I don't understand
run_rule_with_mocks
enough. I have 2 field sets i"m testing with
run_test
. If I omit the
MockGet(RunRequest, SecondFieldSetType)
it runs but complains about not being able to satisfy the request. If I add it I get
ValueError
about the
Get
providers. Not sure what I'm doing wrong.
e
Is your example intended to be accurate? It has no 3rd argument - the actual mock callable: https://github.com/pantsbuild/pants/blob/2168bb3b0a5074e4f69644fa78df60f4ed3098be/src/python/pants/testutil/rule_runner.py#L522-L528
b
Ahhhhh found it, looks like the previous authors were lazy and left off
union_membership