예제 #1
0
def test_create_with_synapse_dynamics():
    p1 = MockPopulation()
    p2 = MockPopulation()
    prj = common.Projection(p1,
                            p2,
                            method=Mock(),
                            synapse_dynamics=standardmodels.SynapseDynamics())
예제 #2
0
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
예제 #3
0
파일: commontests.py 프로젝트: tclose/PyNN
 def test_describe(self):
     s = standardmodels.SynapseDynamics()
     assert isinstance(s.describe(), basestring)
     assert isinstance(s.describe(template=None), dict)