Replies: 1 comment
|
Hi @Drako2711
A parametrized test case is selected using its complete node ID, for example: pytest "PurchaseTest.py::test_purchase[var]"Quoting the full node ID is especially important in shells where If def pytest_addoption(parser):
parser.addoption("--var")and invoke: pytest PurchaseTest.py --alluredir ./results --var valueFrom the posted information I cannot prove exactly why the old invocation collected seven extra tests — shell parsing or a plugin handling that extra positional argument could be involved. Please mark this answer as accepted if it helped, thank you. |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I am using the pytest command:
python3 -m pytest LoginTest.py --alluredir ./resultsConsole:
to go through the tests in my file, but when I add square brackets the items found are duplicated, for example from 7 it goes to 14, and so on.
This is the command, even if I leave the square brackets empty, it duplicates the same, has anyone else had this happen?
python3 -m pytest PurchaseTest.py --alluredir ./results [var]Console:
All reactions