from pants.testutil.rule_runner import RuleRunner from my_project.rules import my_rule def test_my_rule(): rule_runner = RuleRunner() result = rule_runner.request_product(my_rule, input_data) assert result == expected_output
from pants.testutil.rule_runner import RuleRunner from my_project.rules import my_other_rule def test_my_other_rule(): rule_runner = RuleRunner() result = rule_runner.request_product(my_other_rule, input_data, **options) assert result == expected_outputThis code requests the product produced by `my_other_rule` with some input data and options (provided as keyword arguments). It then asserts that the result matches the expected output. Based on the import statements, these examples are likely part of a Python package called `my_project`, which has its own set of rules defined within the `my_project.rules` module.