hey folks, I'm writing helpers to generate rules f...
# development
c
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
How do we test them today?
c
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
Well if it's already under tested... 🤔