Observation of the day: conditional code which cal...
# development
a
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