Example #1
0
def TestScoredNetworkHashing():
    # test due to a bug encountered earlier
    net = network.Network([data.Variable(x) for x in range(5)], "0,1;1,2;4,3")
    snet = result._ScoredNetwork(net.edges, -10)
    for i in xrange(1000):
        if hash(snet) != hash(deepcopy(snet)):
            assert False
Example #2
0
 def setUp(self):
     net1 = network.Network([data.Variable(x) for x in range(5)], "0,1")
     self.sn1 = result._ScoredNetwork(net1.edges, -11.15)
     net2 = network.Network([data.Variable(x) for x in range(5)], "1,0")
     self.sn2 = result._ScoredNetwork(net2.edges, -11.15)