SNOW-1337700: Generate Snowpark tests from SnowCLI
Closed this issue · 3 comments
Description
Much like the templating feature for Snowflake Native Applications using the Snowflake CLI, is there a way to potentially generate a template for Snowpark tests (https://docs.snowflake.com/en/developer-guide/snowpark/python/testing-locally) using Snowflake CLI? Or perhaps to generate the specific tests by passing in Snowpark code to the Snowflake CLI?
i.e.:
snow tests --generate file.py
ls
file_generated-tests.py
snow tests run file_generated-tests.py
Output:
3 of 4 tests passed. Failing tests:
...
Thank you
Context
Faster and easier way of using Snowpark, and enabling more TDD
Shouldn't this be part of snowpark library? Not sure if we want to couple this with cli.
Shouldn't this be part of snowpark library? Not sure if we want to couple this with cli.
Arguably, it could be. I was thinking this could be part of the snow snowpark ...
set of commands. So above I guess I should've included snow snowpark tests --generate file.py
. (It could be also be integrated with the Snowpark testing framework.) I added here per Anurag's request, and also chatted with @sfc-gh-jfreeberg about it a little while ago (in case you want to add anything here Jason).
We are going to work on generalized init
command that should enable more use cases, including generating project with tests.