Пример #1
0
    def test_modify_attr(self):
        #inputs
        old_states = ['11','00']
        new_states = ['11','10', '00', '01', '11']
        f_type = "lambda_bool"
        node_names = ['a','b']
        old_sol = [[0,0], [1,1]] 
        new_sol = [[0,0], [0,1], [1,1], [1,0]] 

        #declare attr
        attr = Attractor(old_states, f_type, node_names)
        self.assertEqual( old_sol, attr.states)
        #modify states
        attr.states = new_states
        self.assertEqual( new_sol, attr.states)