-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_definitions.py: Load YAML files only once (#388)
Instead of loading the YAML files in @pytest.mark.parametrize expression of each test case (i.e. we're parsing 169 YAML files three times over), preload the files into a global variable that we use in the test parametrization. This decreases the execution time by about 65%. Also, by passing the "ids" kwarg to @pytest.mark.parametrize we can choose the name of each parametrized test so that's it's useful description rather than just a generic string with an autoincremented integer at the end. This allowed us to cut back on some assertion failure messages since they no longer have to be so verbose.
- Loading branch information
1 parent
5134aea
commit c0b880d
Showing
1 changed file
with
40 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters