def test_create_with_synapse_dynamics(): p1 = MockPopulation() p2 = MockPopulation() prj = common.Projection(p1, p2, method=Mock(), synapse_dynamics=standardmodels.SynapseDynamics())
def test_describe(): orig_len = common.Projection.__len__ common.Projection.__len__ = Mock(return_value=42) p1 = MockPopulation() p2 = MockPopulation() prj = common.Projection(p1, p2, method=Mock(), synapse_dynamics=standardmodels.SynapseDynamics()) prj.pre.describe = Mock() prj.post.describe = Mock() assert isinstance(prj.describe(engine='string'), basestring) assert isinstance(prj.describe(template=None), dict) common.Projection.__len__ = orig_len
def test_describe(self): s = standardmodels.SynapseDynamics() assert isinstance(s.describe(), basestring) assert isinstance(s.describe(template=None), dict)