Skip to content

marks should propogate through fixtures #2399

Closed
@majuscule

Description

@majuscule

Example code below. Expected output: passing tests. Actual output, AssertionError.

import pytest

@pytest.fixture(scope='function', autouse=True)
def db_rollback(request):
    assert request.node.get_marker('db_rollback_exempt')

@pytest.fixture(scope='function')
@pytest.mark.db_rollback_exempt
def context():
    return True

def test_foo(context):
    assert True

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: marksrelated to marks, either the general marks or builtintype: enhancementnew feature or API change, should be merged into features branchtype: feature-branchnew feature or API change, should be merged into features branchtype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions