Skip to content

Instantly share code, notes, and snippets.

@dchuvardynskyi
Last active November 25, 2019 15:27
Show Gist options
  • Select an option

  • Save dchuvardynskyi/b9c8f03e802c8e5a76d0134e47a84a93 to your computer and use it in GitHub Desktop.

Select an option

Save dchuvardynskyi/b9c8f03e802c8e5a76d0134e47a84a93 to your computer and use it in GitHub Desktop.
Pytest simple parametrize
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