scope='function' is implied in @pytest.fixture()
Fixtures with function scope should not specify scope explicitly because function scope is implied by default.
Bad code:
import pytest
@pytest.fixture(scope='function')
def my_fixture():
...
Good code:
import pytest
@pytest.fixture()
def my_fixture():
...
- to enforce consistency between all fixtures in a codebase