You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than do a loop that tests many choices of window function, this should be parametrized. It should also be broken up into multiple test functions--one that tests basic parameters (e.g. window length, type, and range), and one that tests normalization. There's certainly a way to parametrize fixtures so that you don't need to repeat code when parametrizing over windows, though I don't remember how to do it off the top of my head. Here's a quick example of one such rewrite:
#125
Open
aewallwi opened this issue
May 3, 2021
· 0 comments
Rather than do a loop that tests many choices of window function, this should be parametrized. It should also be broken up into multiple test functions--one that tests basic parameters (e.g. window length, type, and range), and one that tests normalization. There's certainly a way to parametrize fixtures so that you don't need to repeat code when parametrizing over windows, though I don't remember how to do it off the top of my head. Here's a quick example of one such rewrite:
Of course in the actual test you'll want to include more choices of window function. If you want to get the full outer product of different parameter choices, then you'll do successive @pytest.mark.parametrize decorations, e.g.
Rather than do a loop that tests many choices of window function, this should be parametrized. It should also be broken up into multiple test functions--one that tests basic parameters (e.g. window length, type, and range), and one that tests normalization. There's certainly a way to parametrize fixtures so that you don't need to repeat code when parametrizing over windows, though I don't remember how to do it off the top of my head. Here's a quick example of one such rewrite:
Of course in the actual test you'll want to include more choices of window function. If you want to get the full outer product of different parameter choices, then you'll do successive
@pytest.mark.parametrize
decorations, e.g.The above example will test all 6 possible pairings of values from the two parameter lists.
Originally posted by @r-pascua in #112 (comment)
The text was updated successfully, but these errors were encountered: