Skip to content

Fixtures get called with NOT_USED as a parameter when using a fixture union #37

@smarie

Description

@smarie
from pytest_cases import param_fixture, fixture_union, pytest_fixture_plus

a = param_fixture('a', ['x', 'y'])

@pytest_fixture_plus(params=[1, 2])
def b(request):
    assert request.param in [1, 2]  # this fails !
    return request.param

c = fixture_union('c', [a, b])

def test_fixture_union(c, a):
    print(c, a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions