2

I have a test case where the parametrize decorator uses an iterator (that receives two path files as arguments) which test their validity.

def iter_wb_results(expected_path, test_path):
    test_file = open(test_path, "r")
    ...

@pytest.mark.parametrize("first, second", iter_wb_results(EXPECTED_RESULTS_PATH, TEST_PATH), ids=repr)
def test_cell_compare(first, second):
    assert first == second, "No way"

The question is how do I pass arguments (the EXPECTED_RESULTS_PATH, TEST_PATH) to the iterator (iter_wb_results) from the command line?

Drxxd
  • 1,860
  • 14
  • 34

0 Answers0