If we go with the above, we need to think of how t...
# development
h
If we go with the above, we need to think of how to name things…see https://www.pantsbuild.org/v2.0/docs/rules-api-testing for the four approaches I think we should document: 1. normal Python tests 2.
run_rule()
/ aka unit tests for rules 3.
RuleRunner()
/ aka integration tests for rules 4.
run_pants()
/ aka integration tests for Pants (end-to-end tests?)
run_rule()
and
RuleRunner()
sound way too similar. One possibility is to consolidate #2 and #3 a bit so that you always use
RuleRunner
for them. For #2, you use a classmethod like
RuleRunner.run_rule_with_mocks()
, whereas with #3 you run an instance method
rule_runner.request_product()
👨‍🎓 1
👍 1
✍️ 1