def test_in_false(self): vs = VectorSet(self.parent_node) self.assertEqual(self.vP1 in vs, False)
def test_remove_failure(self): vs = VectorSet(self.parent_node) self.assertEqual(vs.remove(self.vP1), False)
def test_in_true(self): vs = VectorSet(self.parent_node) vs.add(self.vP1) self.assertEqual(self.vP1 in vs, True)
def test_remove_succeed(self): vs = VectorSet(self.parent_node) vs.add(self.vP1) self.assertEqual(vs.remove(self.vP1), True)
def test_len_same_after_failed_add(self): vs = VectorSet(self.parent_node) vs.add(self.vP1) length = len(vs) vs.add(self.vP1) self.assertEqual(len(vs), length)
def test_add_repeat_vector(self): vs = VectorSet(self.parent_node) vs.add(self.vP1) self.assertEqual(vs.add(self.vP1), False)
def test_add(self): vs = VectorSet(self.parent_node) try: vs.add(self.vP1) except ValueError as ve: self.fail(ve.args)
def test_len_0(self): vs = VectorSet(self.parent_node) self.assertEqual(len(vs), 0)