I have several Python programs with multiple variants, e.g.:
sort_bubble_0.py
sort_bubble_1.py
sort_insertion_0.py
sort_insertion_1.py
sort_selection_0.py
...
unique_elements_0.py
unique_elements_1.py
unique_elements_2.py
...
In each group, all variants have the same interface.
In pytest, is it possible to have a unique test suite for each group, which would be launched successively on all the variants?
Ideally, a small snippet of code in the test suite would be able to discover all the appropriate variants based on a regular expression (e.g., r"sort_.*\.py"), import and test them one by one.
For now on, I just duplicate the same test suite as many times as needed, and manually change the imported name in each copy! I guess there should be a better way to do this.