The pytest docs for @pytest.fixture say this:
If a fixture is used in the same module in which it is defined, the
function name of the fixture will be shadowed by the function arg that
requests the fixture; one way to resolve this is to name the decorated
functionfixture_<fixturename>and then use
@pytest.fixture(name="<fixturename>").
So this solution is similar to your option 1, except that the pytest author suggests a slightly more descriptive name for the fixture function. So replace these two lines
@pytest.fixture
def my_wallet():
with:
@pytest.fixture(name="my_wallet")
def fixture_my_wallet():
The description in the docs also hints at another solution which is to move the fixtures into conftest.py so they are not in the same module as the test code using the fixtures. This location is also useful for sharing fixtures among test modules.