Exemplo n.º 1
0
 def test_mutating_nested_container_attribute_does_not_persist(self):
   nca = t2.NestedContainerAttributes()
   nca.int_set_vector.append({1})
   self.assertEqual(nca.int_set_vector, [])
Exemplo n.º 2
0
 def test_setting_nested_container_attribute_overwrites(self):
   nca = t2.NestedContainerAttributes()
   nca.int_set_vector = [{1}, {2}, {3}]
   nca.int_set_vector = [{4}]
   self.assertEqual(nca.int_set_vector, [{4}])