Skip to content

Feat/multispectral dataloader 5ch #11517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
Pytest configuration file for multispectral dataloader tests.

This file registers custom command-line options and fixtures for pytest.
"""

import os
import pytest

def pytest_addoption(parser):
"""Add custom command line options to pytest."""
parser.addoption(
"--data-dir",
action="store",
default=None,
help="Directory containing multispectral TIFF files for testing"
)

@pytest.fixture
def data_dir(request):
"""Fixture to provide the data directory path to tests."""
data_dir = request.config.getoption("--data-dir")
if data_dir is None:
pytest.skip("--data-dir not specified")
if not os.path.exists(data_dir):
pytest.skip(f"Data directory {data_dir} does not exist")
return data_dir
Loading