Ejemplo n.º 1
0
 def test_log2(self):
     simulation = Simulation(str(TEST_DATA_DIR / "simulation_config.json"))
     simulation._config["output"]["log_file"] = "unknown"
     test_obj = test_module.SpikeReport(simulation)
     with pytest.raises(BluepySnapError):
         with test_obj.log() as log:
             log.readlines()
Ejemplo n.º 2
0
    def test_get2(self):
        test_obj = test_module.SpikeReport(self.simulation)["default2"]
        assert test_obj._sorted_by == "by_id"
        pdt.assert_series_equal(
            test_obj.get([2, 0]),
            _create_series([2, 0, 2, 0], [0.1, 0.2, 0.7, 1.3], name="ids"))

        pdt.assert_series_equal(
            test_obj.get([0, 2]),
            _create_series([2, 0, 2, 0], [0.1, 0.2, 0.7, 1.3], name="ids"))
Ejemplo n.º 3
0
 def setup(self):
     self.simulation = Simulation(
         str(TEST_DATA_DIR / "simulation_config.json"))
     self.test_obj = test_module.SpikeReport(self.simulation)
Ejemplo n.º 4
0
 def test_nodes_invalid_population(self):
     test_obj = test_module.SpikeReport(self.simulation)["default2"]
     test_obj._population_name = "unknown"
     with pytest.raises(BluepySnapError):
         test_obj.nodes