Пример #1
0
 def test_in_false(self):
     vs = VectorSet(self.parent_node)
     self.assertEqual(self.vP1 in vs, False)
Пример #2
0
 def test_remove_failure(self):
     vs = VectorSet(self.parent_node)
     self.assertEqual(vs.remove(self.vP1), False)
Пример #3
0
 def test_in_true(self):
     vs = VectorSet(self.parent_node)
     vs.add(self.vP1)
     self.assertEqual(self.vP1 in vs, True)
Пример #4
0
 def test_remove_succeed(self):
     vs = VectorSet(self.parent_node)
     vs.add(self.vP1)
     self.assertEqual(vs.remove(self.vP1), True)
Пример #5
0
 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)
Пример #6
0
 def test_add_repeat_vector(self):
     vs = VectorSet(self.parent_node)
     vs.add(self.vP1)
     self.assertEqual(vs.add(self.vP1), False)
Пример #7
0
 def test_add(self):
     vs = VectorSet(self.parent_node)
     try:
         vs.add(self.vP1)
     except ValueError as ve:
         self.fail(ve.args)
Пример #8
0
 def test_len_0(self):
     vs = VectorSet(self.parent_node)
     self.assertEqual(len(vs), 0)