Skip to content

Commit ab77d26

Browse files
committed
refactor(conftest): don't make clients session scoped
patching them will overwrite attributes
1 parent 61f4a99 commit ab77d26

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ohsome/test/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
logger = logging.getLogger(__name__)
99

1010

11-
@pytest.fixture(scope="session")
12-
def base_client(tmpdir_factory):
11+
@pytest.fixture
12+
def base_client(mocked_metadata, tmpdir_factory):
1313
"""Session-wide test client."""
1414
temp_directory = tmpdir_factory.mktemp("base_client").mkdir("logs").strpath
1515
client = ohsome.OhsomeClient(log_dir=temp_directory)
1616
assert client.metadata # call metadata once to ensure it is cached
1717
yield client
1818

1919

20-
@pytest.fixture(scope="session")
21-
def base_client_without_log():
20+
@pytest.fixture
21+
def base_client_without_log(mocked_metadata):
2222
"""Session-wide test client."""
2323
client = ohsome.OhsomeClient(log=False)
2424
assert client.metadata # call metadata once to ensure it is cached
2525
yield client
2626

2727

28-
@pytest.fixture(scope="session")
28+
@pytest.fixture
2929
def custom_client_with_wrong_url(tmpdir_factory):
3030
"""Session-wide test client."""
3131
temp_directory = tmpdir_factory.mktemp("base_client").mkdir("logs").strpath

0 commit comments

Comments
 (0)