https://pantsbuild.org/ logo
#development
Title
# development
a

average-vr-56795

12/11/2018, 7:19 PM
Observation of the day: conditional code which calls coroutines is awkward to unit test...
Copy code
@rule(Foo, [Select(Bar)]
def foo(bar):
  if True:
    b = yield Get(Baz, Bar, bar)
  else:
    b = yield Get(Bash, Bar, bar)
  yield b.Foo
In
run_rule
, I need paths from
Bar
to both
Baz
and
Bash
in my mock rules dict, not just the one that is used, because of the pre-parsing of `Get`s