How to pass arguments in pytest by command line
22:07 29 Nov 2016

I have a code and I need to pass the arguments like name from terminal. Here is my code and how to pass the arguments. I am getting a "File not found" kind error that I don't understand.

I have tried the command in the terminal: pytest .py -almonds I should get the name printed as "almonds"

@pytest.mark.parametrize("name")
def print_name(name):
    print ("Displaying name: %s" % name)
python testing pytest command-line-arguments