https://pantsbuild.org/ logo
c

careful-address-89803

11/03/2022, 1:46 AM
hey folks, I'm writing helpers to generate rules for simple python lockfile generation. How would I test that? MY first thought is that I would pick a python tool and query for the goal output, but that seems fragile. Can you folks think of an intermediate target for the query rule? Also, since the code I'm writing is generating rules, is proving that the rulegraph closes sufficient?
👀 1
b

bitter-ability-32190

11/03/2022, 10:53 AM
How do we test them today?
c

careful-address-89803

11/05/2022, 4:37 PM
The tools that test their lockfile generation make a
rule_runner.request(GeneratePythonLockfile, [BlackLockfileSentinel()])
. but, uh,
from_tool
, which seems pretty used, doesn't seem to be directly invoked in any tests? testing lockfiles themselves uses ansicolors. But that's not using a tool, just a normal resolve.
b

bitter-ability-32190

11/05/2022, 4:43 PM
Well if it's already under tested... 🤔