Exemplo n.º 1
0
def test_flow_centrality_real(real_arbor_parser, result_factory):
    sources = real_arbor_parser.inputs
    targets = real_arbor_parser.outputs
    real = real_arbor_parser.arbor.flow_centrality(targets, sources)

    expected = result_factory(FIXTURE_DIR, "flow_centrality").result
    assert to_jso_like(real) == expected
Exemplo n.º 2
0
def test_find_arbor_regions_real(
    real_arbor_parser: ArborParser, real_syn_clus: SynapseClustering, result_factory
):
    """depends on test_arbor.test_flow_centralities"""
    arbor = real_arbor_parser.arbor
    fcs = arbor.flow_centrality(real_arbor_parser.outputs, real_arbor_parser.inputs)
    arbor_regions = real_syn_clus.find_arbor_regions(fcs, FRACTION, arbor)
    expected = result_factory(FIXTURE_DIR, "find_arbor_regions").result
    assert to_jso_like(arbor_regions) == expected
Exemplo n.º 3
0
def test_find_axon_real(
    real_arbor_parser: ArborParser, real_syn_clus: SynapseClustering, result_factory
):
    axon = real_syn_clus.find_axon(
        real_arbor_parser, FRACTION, real_arbor_parser.positions
    )
    expected = result_factory(FIXTURE_DIR, "find_axon").result

    assert to_jso_like(axon) == expected
Exemplo n.º 4
0
def test_find_axon_cut_real(
    real_arbor_parser: ArborParser, real_syn_clus: SynapseClustering, result_factory
):
    """depends on test_find_arbor_regions_real"""
    arbor = real_arbor_parser.arbor
    fcs = arbor.flow_centrality(real_arbor_parser.outputs, real_arbor_parser.inputs)
    arbor_regions = real_syn_clus.find_arbor_regions(fcs, FRACTION, arbor)

    axon_cut = real_syn_clus.find_axon_cut(
        real_arbor_parser.outputs,
        above=arbor_regions.above,
        positions=real_arbor_parser.positions,
        arbor=arbor,
    )

    expected = result_factory(FIXTURE_DIR, "find_axon_cut").result
    assert to_jso_like(axon_cut) == expected
Exemplo n.º 5
0
def test_instantiate_real(real_syn_clus: SynapseClustering, result_factory):
    """Checks that distance_map works, among other things"""
    expected = result_factory(FIXTURE_DIR, "synapse_clustering").result
    assert to_jso_like(real_syn_clus) == expected
Exemplo n.º 6
0
def test_setup_correctly(real_arbor, result_factory):
    expected = result_factory("arbor_parser", "from_compact-arbor").result["arbor"]
    real_jso = to_jso_like(real_arbor)
    assert real_jso == expected