def test_conn_init_uses_the_spec_you_pass_it(): spec = sp.ConnSpec() pre = un.Unit() post = un.Unit() conn = pr.Conn("proj1", pre, post, spec=spec) assert conn.spec is spec
def test_conn_has_a_weight(): pre = un.Unit() post = un.Unit() conn = pr.Conn("con1", pre, post) assert conn.wt > 0
def test_projn_has_a_sending_unit(): pre = un.Unit() post = un.Unit() conn = pr.Conn("con1", pre, post) assert conn.pre == pre
def test_conn_has_a_receiving_unit(): pre = un.Unit() post = un.Unit() conn = pr.Conn("con1", pre, post) assert conn.post == post
def test_conn_has_a_name(): pre = un.Unit() post = un.Unit() conn = pr.Conn("con1", pre, post) assert conn.name == "con1"