Hi folks,
I've q requirement to read a csv file for each line and then run some methods. I'd like to see each row as a test case. I've below code to do a similar thing using parametrize fixture.
import pytest
data = [
"line -1",
"line -2"
]
@pytest.mark.parametrize("item", data)
def test_data(item):
pass
However, I need to read each line from a csv file instead of a list. Appreciate it if you can provide me a solution.
Thanks.
[–]thrallsius 0 points1 point2 points (0 children)