Esempio n. 1
0
def test_make_tree_postaction():
    def post_action(t):
        t.foo = 'bar'

    rd = RAW_DATA[0]
    seg_ids = utils.get_initial_neurite_segment_ids(rd)
    trees = [utils.make_point_tree(rd, root_id=seg_id, post_action=post_action)
             for seg_id in seg_ids]
    for t in trees:
        nt.ok_(hasattr(t, 'foo') and t.foo == 'bar')
Esempio n. 2
0
def test_make_point_tree():
    rd = RAW_DATA[0]
    seg_ids = utils.get_initial_neurite_segment_ids(rd)
    trees = [utils.make_point_tree(rd, seg_id) for seg_id in seg_ids]
    nt.ok_(len(trees) == len(INIT_IDS[0]))
    _check_trees(trees)