Skip to content

Commit fa34451

Browse files
committed
add test
1 parent 39ec2ec commit fa34451

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/test_simple_group.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from emannotationschemas.schemas.groups import SimpleGroup, SimpleGroupIndexed
2+
3+
good_simple_group = {
4+
"pt": {"position": [31, 32, 33]},
5+
"group_id": 42,
6+
}
7+
8+
good_simple_group_indexed = {
9+
"pt": {"position": [10, 20, 30]},
10+
"group_id": 123,
11+
}
12+
13+
14+
def test_simple_group_schema():
15+
schema = SimpleGroup()
16+
result = schema.load(good_simple_group)
17+
assert result["group_id"] == 42
18+
assert result["pt"]["position"] == [31, 32, 33]
19+
20+
21+
def test_simple_group_indexed_schema():
22+
schema = SimpleGroupIndexed()
23+
result = schema.load(good_simple_group_indexed)
24+
assert result["group_id"] == 123
25+
assert result["pt"]["position"] == [10, 20, 30]

0 commit comments

Comments
 (0)