Skip to content

@pytest.mark.usefixtures take no effects on fixtures #378

@pytestbot

Description

@pytestbot

Originally reported by: BitBucket: oxyry, GitHub: oxyry


#!python
import pytest

@pytest.fixture
def app(scope='session'):
    print('fixture.app')

@pytest.fixture
def client(app):
    print('fixture.client')

@pytest.fixture
@pytest.mark.usefixtures('client')
def user_tom():
    print('user jessie')

def test_a(user_tom):
    print('test_a')
    assert False

In above code, 'client' fixture does not run, but it runs if put 'client' into user_tom()'s args list.


Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions