Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Pytest 3.0 does not accept empty list in fixture #1849
With pytest 2.x it was very easy to use empty lists in fixture if dynamically run test case did not find anything to test. pytest 3.x seems to accept only None values.
Also when setting empty list in fixture with pytest 3.x the error message is very ugly
@pytest.fixture(scope="module", ids=list(), params=list()) def temp(request): return request.param def test_temp(temp): pass
(edited by @The-Compiler to add code blocks)
For reference, this is the behavior with 2.9.2: