Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 396 Bytes

PT026.md

File metadata and controls

33 lines (22 loc) · 396 Bytes

PT023

useless pytest.mark.usefixtures without parameters

Examples

Bad code:

import pytest

@pytest.mark.usefixtures()
def test_something():
    ...

@pytest.mark.usefixtures
def test_something_else():
    ...

Good code:

import pytest

@pytest.mark.usefixtures('a')
def test_something():
    ...

Rationale

  • such mark has no effect and is unnecessary