def test_set(self):
		from grease.component.field import FieldAccessor
		entities = set([3,7,8])
		comp = TestComponent()
		for i in range(9):
			comp[i] = TestData(id=i, xy=TestData(x=i*10, y=i*-10))
		id_accessor = FieldAccessor(TestField(comp, 'id'), entities)
		xy_accessor = FieldAccessor(TestField(comp, 'xy'), entities)
		id_accessor.__set__(10)
		xy_accessor.x = 0
		for i in range(9):
			if i in entities:
				self.assertEqual(comp[i].id, 10)
				self.assertEqual(comp[i].xy.x, 0)
				self.assertEqual(comp[i].xy.y, i*-10)
			else:
				self.assertEqual(comp[i].id, i)
				self.assertEqual(comp[i].xy.x, i*10)
				self.assertEqual(comp[i].xy.y, i*-10)
dataset/ETHPy150Open caseman/grease/test/field_test.py/FieldAccessorTestCase.test_set/original