from pants.testutil.rule_runner import RuleRunner def test_integer_option(): rr = RuleRunner() rr.set_options(custom_int=42) assert rr.context.options.custom_int == 42
from pants.testutil.rule_runner import RuleRunner def test_boolean_option(): rr = RuleRunner() rr.set_options(custom_bool=True) assert rr.context.options.custom_bool is TrueThis example defines a custom option named `custom_bool` and sets its value to `True` using the `set_options` method. The value of the option can then be accessed within the test case using `rr.context.options.custom_bool`. Package Library: `pants`