Last active
November 25, 2019 15:27
-
-
Save dchuvardynskyi/b9c8f03e802c8e5a76d0134e47a84a93 to your computer and use it in GitHub Desktop.
Pytest simple parametrize
This file contains hidden or 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
| import pytest | |
| @pytest.mark.parametrize( | |
| 'text_input, result', [('5+5', 10), ('1+4', 5)] | |
| ) | |
| def test_sum(text_input, result): | |
| assert eval(text_input) == result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment