Test Suite
April 24, 2026 · View on GitHub
This directory contains the current pytest-based test suite for GloViTa.
Scope
The tests primarily cover:
- dataset classes
- augmentation policy construction
- dataset factory / dataloader wiring
The test suite is useful for:
- validating refactors
- checking that config/factory integration works
- smoke-testing new dataset additions
Current Test Files
tests/
├── conftest.py
├── test_all_datasets.py
├── test_augmentations.py
├── test_datamodules.py
├── test_generic_image_dataset.py
└── test_datasets.py
test_datamodules.py covers the dataset factory and dataloader path.
Running Tests
Run everything:
pytest
Verbose output:
pytest -v
Run one file:
pytest tests/test_datamodules.py
Markers
Current markers used in the suite include:
unitintegrationrequires_dataslowaugmentationdatamodule
Examples:
pytest -m unit
pytest -m "integration and requires_data"
pytest -m "not slow"
pytest -m augmentation
Dataset-Dependent Tests
Some tests require real dataset files to be present locally. Those are marked with:
integrationrequires_data
If the expected dataset path is missing, those tests usually skip rather than fail.
Common Usage Patterns
Check Dataset Factory Wiring
pytest tests/test_datamodules.py -v
Check Augmentation Construction
pytest tests/test_augmentations.py -v
Run Only Fast Tests
pytest -m "unit and not slow"
When Adding A New Dataset
When you add a new dataset, check at least:
- the dataset config class exists
- the dataset is registered in the dataset factory
- one dataloader batch can be constructed
In practice, that usually means updating:
tests/conftest.py- and re-running:
tests/test_datasets.pytests/test_datamodules.py
When Adding A New Augmentation Policy
For a new augmentation policy, re-run:
pytest tests/test_augmentations.py -v
This is the quickest sanity check that the policy module still builds valid train/test transforms.