Open jirikuncar opened 5 years ago
Why?
I am using it to define more advanced fixtures. I could try to make the current fixtures more configurable but it will complicate the codebase.
I genuinely don't understand your use case. What does "more advanced fixtures" mean?
I have something along this lines in my client tests:
@pytest.fixture(scope="session")
def recorder():
import betamax
import client
session = client.Client("http://localhost:8000")
with betamax.Betamax(session) as vrc:
yield vrc
@pytest.fixture
def session(request, recorder):
from betamax.fixtures.pytest import _casette_name
recorder.use_cassette(_casette_name(request, True))
yield recorder.session
and I would like to make sure that _cas(s)ette_name
becomes a public API.
Rename
_ca(s)sette_name
helper function tocassette_name
to be a part of the API.