Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(3 -4 0 2)
(3 -6 0 2)
(3 -8 0 2)
(3 -10 0 2)
(
(3 -10 0 2)
(0 -10 0 2)
(-3 -10 0 2)
| ; <-- empty sibling but still works !
)
)
''') as tmp_file:
n = Morphology(tmp_file.name)
assert_equal(len(n.annotations), 1)
annotation = n.annotations[0]
assert_equal(annotation.type, morphio.AnnotationType.single_child)
assert_substring('It will be merged with the parent section',
err.getvalue().strip())
assert_equal(len(n.root_sections), 1)
assert_array_equal(n.root_sections[0].points,
np.array([[3, -4, 0],
[3, -6, 0],
[3, -8, 0],
[3, -10, 0],
[0, -10, 0],
[-3, -10, 0]],
dtype=np.float32))
assert_equal(len(n.annotations), 1)
annotation = n.annotations[0]
assert_equal(annotation.type, morphio.AnnotationType.single_child)
assert_equal(annotation.line_number, 6)
assert_array_equal(annotation.points, [[3, -10, 0], [0, -10, 0], [-3, -10, 0]])
assert_array_equal(annotation.diameters, [2, 2, 2])