Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pytest handling muliple cases

import pytest

@pytest.mark.parametrized("input", "expected", [
	(1, 1),
  	('a', 'a'),
  	("One", "One")
])
def test_check_input_and_expected(input, expected):
	assert ( input == expected )
 
PREVIOUS NEXT
Tagged: #pytest #handling #muliple #cases
ADD COMMENT
Topic
Name
5+4 =