-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathsample_datasets.py
More file actions
38 lines (30 loc) · 1.19 KB
/
sample_datasets.py
File metadata and controls
38 lines (30 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Session-scoped fixtures for sample datasets stored in the integration-tests data folder."""
import pytest
from tests.utils.classes import (
IntegrationTestPathConfig,
SampleDataset,
)
@pytest.fixture(scope="session")
def json_multifile(
integration_test_path_config: IntegrationTestPathConfig,
) -> SampleDataset:
"""Returns an object corresponding to the `json_multifile` sample dataset."""
return SampleDataset(
dataset_root_dir=integration_test_path_config.test_data_dir / "json_multifile",
)
@pytest.fixture(scope="session")
def text_multifile(
integration_test_path_config: IntegrationTestPathConfig,
) -> SampleDataset:
"""Returns an object corresponding to the `text_multifile` sample dataset."""
return SampleDataset(
dataset_root_dir=integration_test_path_config.test_data_dir / "text_multifile",
)
@pytest.fixture(scope="session")
def text_singlefile(
integration_test_path_config: IntegrationTestPathConfig,
) -> SampleDataset:
"""Returns an object corresponding to the `text_singlefile` sample dataset."""
return SampleDataset(
dataset_root_dir=integration_test_path_config.test_data_dir / "text_singlefile",
)