:wave: Hello! Quite new to pants (we're currently ...
# plugins
h
👋 Hello! Quite new to pants (we're currently using 2.21), and working on a plugin to generate a constraints file for our requirements. The plugin works quite well (retrieves a poetry pex, reads the requirements and generates a lockfile, and uses it to generate a constraints.txt), however I'm hitting a wall while testing it. Specifically, I'm using
run_goal_rule
to unit test my
Constraints
goal, but this fails because I can't find a working way to mock the rule that downloads a poetry pex. I tried using
run_rule_with_mocks
to mock this rule via
MockGet
, but I'm not quite sure how to pass the right requirements to test my goal. The ideal scenario would be
run_goal_rule_with_mocks
, but I don't think that exists atm 😅 Would really appreciate some guidance, thanks!
b
Sorry for the delay. I'm not sure what the best answer is here... and I imagine that people have been distracted by the holiday period. If you haven't found an answer yet, definitely feel free to re-ask it (and/or post a link in #C0D7TNJHL )
h
Will do, thanks! I've kind of hacked my way around it by doing a
run_rule_with_mocks
on the goal and mocking every rule, but I'm sure there's a better way...