Hi,
I am new to the pytest and still exploring it. I have been searching
extensively for data driven testing modules provided by pytest but could not
find anything substantial for it. I did came across that using parametrize it
can be done but when I am trying to pass data from fixture to the
pytest.mark.paramaetrize it does not accept it, below it the small snippet that
I am doing.
@pytest.fixture
Def data():
Return data
@pytest.mark.parametrize(“input”,data):
Def test_ddt(input):
Print input
Executing it says that NameError: name 'data' is not defined
Please do let me know what is the most appropriate and efficient way of
achieving data driven testing using pytest.
Thanks in advance!!
Regards,
Anshul
_______________________________________________
Pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev