Skip to content

Commit

Permalink
moved sample_project fixture to conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Jul 14, 2023
1 parent 64b3026 commit fdb7c1c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 11 additions & 0 deletions tests/test_unit/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from pathlib import Path

import pytest

from wazp.datasets import get_sample_project


@pytest.fixture()
def sample_project() -> Path:
"""Get the sample project for testing."""
return get_sample_project("jewel-wasp", "short-clips_compressed", progressbar=True)
9 changes: 0 additions & 9 deletions tests/test_unit/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
import glob
import tempfile
from pathlib import Path

import pytest
import yaml

from wazp.datasets import get_sample_project
from wazp.utils import df_from_metadata_yaml_files


# Pytest fixture for getting a sample project
@pytest.fixture(scope="session")
def sample_project() -> Path:
"""Get the sample project for testing."""
return get_sample_project("jewel-wasp", "short-clips_compressed", progressbar=True)


@pytest.fixture
def metadata_fields(sample_project) -> dict:
"""Get the metadata dictionary from the sample project for testing."""
Expand Down

0 comments on commit fdb7c1c

Please sign in to comment.