Skip to content

Pytest 3.0 does not accept empty list in fixture #1849

@OPpuolitaival

Description

@OPpuolitaival

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

example code:

@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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions