Skip to content

Commit 1bab1e5

Browse files
committed
mem storage client fixture minor changes
1 parent cad79e3 commit 1bab1e5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/unit/basic_crawler/test_basic_crawler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,6 @@ async def handler(context: BasicCrawlingContext) -> None:
796796
}
797797

798798

799-
@pytest.mark.only
800799
async def test_respects_no_persist_storage() -> None:
801800
configuration = Configuration(persist_storage=False)
802801
crawler = BasicCrawler(configuration=configuration)

tests/unit/conftest.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ def _isolate_test_environment(
110110
cleanup_test_env()
111111

112112

113-
@pytest.fixture
114-
def memory_storage_client(tmp_path: Path) -> MemoryStorageClient:
115-
return MemoryStorageClient(
116-
write_metadata=True,
117-
persist_storage=True,
118-
storage_dir=str(tmp_path),
119-
)
120-
121-
122113
@pytest.fixture
123114
def httpbin() -> URL:
124115
class URLWrapper:
@@ -198,3 +189,13 @@ async def disabled_proxy(proxy_info: ProxyInfo) -> AsyncGenerator[ProxyInfo, Non
198189
]
199190
):
200191
yield proxy_info
192+
193+
194+
@pytest.fixture
195+
def memory_storage_client(tmp_path: Path) -> MemoryStorageClient:
196+
"""A fixture for testing the memory storage client and its resource clients."""
197+
return MemoryStorageClient(
198+
write_metadata=True,
199+
persist_storage=True,
200+
storage_dir=str(tmp_path),
201+
)

0 commit comments

Comments
 (0)