fix compatibility with pytest-recording

pytest-recording stores cassettes for each module in its own directory.
Using "vcr_cassette_dir" fixture, we override it to use the old
behavior.
pull/407/head
Anna “CyberTailor” 2025-04-21 14:59:44 +05:00
rodzic 9395228416
commit 8736b15a6f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: E7B76EDC50864BB1
2 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -63,6 +63,11 @@ def vcr_config():
decode_compressed_response = True
)
@pytest.fixture(scope="module")
def vcr_cassette_dir(request) -> str:
module = request.node.fspath # current test file
return os.path.join(module.dirname, "cassettes")
# Fixtures for testing against actual, real servers
# Please be extremely careful with these
@pytest.fixture

Wyświetl plik

@ -14,11 +14,6 @@ streaming_is_patched = False
real_connections = []
close_connections = False
@pytest.fixture(scope='module')
def vcr(vcr):
vcr.match_on = ['path']
return vcr
@pytest.fixture(scope='module')
def vcr_config():
return {