-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixture to provide cell data for regression testing
- Loading branch information
1 parent
041b9da
commit f7d1900
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
from pathlib import Path | ||
|
||
import pooch | ||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def data_path(): | ||
"""Directory storing all test data""" | ||
return Path(__file__).parent.parent / "data" | ||
|
||
|
||
@pytest.fixture | ||
def test_data_registry(): | ||
""" | ||
Create a test data registry for BrainGlobe. | ||
Returns: | ||
pooch.Pooch: The test data registry object. | ||
""" | ||
registry = pooch.create( | ||
path=pooch.os_cache("brainglobe_test_data"), | ||
base_url="https://gin.g-node.org/BrainGlobe/test-data/raw/master/", | ||
registry={ | ||
"cellfinder/cells-z-1000-1050.xml": None, | ||
"cellfinder/other-cells-z-1000-1050.xml": None, | ||
}, | ||
) | ||
return registry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters