polortiz4 / bme590_assignment02

MIT License
0 stars 0 forks source link

bradytachy test #52

Closed epvienneau closed 7 years ago

epvienneau commented 7 years ago

Mark- I would like to test my functions bradycardia and tachycardia with multiple inputs, eg test bradycardia once with a threshold of 60 and once with a threshold of 50, etc. I feel like there's a more elegant way to do that then simply calling bradycardia, making some asserts, and then copying and pasting that over and over again. Thoughts? ps I will push my current bradytachy files to my branch (bradytachy) shortly

mlp6 commented 7 years ago

You can create a loop in your testing function that sweeps across an array of threshold values and nest your assert statement within that loop. Would that achieve what you want?

epvienneau commented 7 years ago

Yes! I was just wondering if there was some magical python thing I wasn't aware of (like np.where instead of my loop in bradytachy). Thanks!

mlp6 commented 7 years ago

Nope - no magic on that one!