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