Esempio n. 1
0
 def setup(self):
     config = {
         'edges_file': str(TEST_DATA_DIR / 'edges.h5'),
         'edge_types_file': None,
     }
     self.circuit = Mock()
     self.test_obj = test_module.EdgeStorage(config, self.circuit)
Esempio n. 2
0
    def create_edge_population(filepath, pop_name):
        config = {
            'edges_file': filepath,
            'edge_types_file': None,
        }
        circuit = Mock()
        circuit.config = {}
        create_node_population(str(TEST_DATA_DIR / 'nodes.h5'), "default", circuit=circuit,
                               node_sets=NodeSets(str(TEST_DATA_DIR / 'node_sets.json')))
        storage = test_module.EdgeStorage(config, circuit)
        pop = storage.population(pop_name)

        # check if the source and target populations are in the circuit nodes
        assert pop.source.name in pop._edge_storage.circuit.nodes
        assert pop.target.name in pop._edge_storage.circuit.nodes
        return pop