-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_data_loader.py
More file actions
45 lines (30 loc) · 1.05 KB
/
Copy pathtest_data_loader.py
File metadata and controls
45 lines (30 loc) · 1.05 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
39
40
41
42
43
44
45
import pandas as pd
import pytest
import mapmanagercore.data
def test_load():
"""Check that we can load files from mapmanagercore.data
This loads from a different repo mapmanagercore-data
"""
linesFile = mapmanagercore.data.getLinesFile()
dfLines = pd.read_csv(linesFile)
print('=== test_load dfLines')
print(dfLines)
pointsFile = mapmanagercore.data.getPointsFile()
dfPoints = pd.read_csv(pointsFile)
print('=== test_load dfPoints')
print(dfPoints)
ch1 = mapmanagercore.data.getTiffChannel_1()
ch2 = mapmanagercore.data.getTiffChannel_2()
mmap = mapmanagercore.data.getSingleTimepointMap()
def test_check_file():
from mapmanagercore import MapAnnotations
mmapPath = mapmanagercore.data.getSingleTimepointMap()
# check we can load a map
ok = MapAnnotations.checkFile(mmapPath, verbose=False)
assert ok
# actually load the map
map = MapAnnotations.load(mmapPath)
assert map is not None
if __name__ == '__main__':
# test_load()
test_check_file()