How to run a selection of cases in a parameterized test? #10322
-
I'm one of the maintainers of sqlfluff: https://github.com/sqlfluff/sqlfluff We have many parameterized tests, with functions to generate those cases from yaml files. This is great for reusable code, but it means some test functions have 100+ different combinations of situations being passed to them. We make use of the Because of the number of tests, it's sometimes inconvenient to run all of the cases, but also slow to call individual cases one by one. Is there a way to use wildcards, or smart naming of cases, to be able to run a set of parameter cases matching some pattern or with some prefix? As an example, if we had the following case:
I know we can run We can also call Is it possible to somehow effectively run all of the tests which start with I'm open to solutions which involve changing the setup to make this easier. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The
|
Beta Was this translation helpful? Give feedback.
The
-k
option is pretty close to what you want. It just does a substring search, so it's not quite as powerful as a wildcard, but it can easily distinguish betweenfoo
andbar
in the example you gave: