def test_query_ops_join(self):
		from grease.component.field import FieldAccessor
		comp = TestComponent()
		entities1 = set([2,3,7,8])
		entities2 = set([1,2,3,8])
		comp1 = TestComponent()
		comp2 = TestComponent()
		for i in range(9):
			comp1[i] = TestData(foo=i)
			comp2[i] = TestData(bar=6-i)
		foo_accessor = FieldAccessor(TestField(comp1, 'foo'), entities1)
		bar_accessor = FieldAccessor(TestField(comp2, 'bar'), entities2)
		self.assertEqual(foo_accessor == bar_accessor, set([3]))
		self.assertEqual(foo_accessor > bar_accessor, set([8]))
		self.assertEqual(foo_accessor >= bar_accessor, set([3, 8]))
		self.assertEqual(foo_accessor <= bar_accessor, set([2, 3]))
		self.assertEqual(foo_accessor < bar_accessor, set([2]))
		self.assertEqual(foo_accessor != bar_accessor, set([2,8]))
dataset/ETHPy150Open caseman/grease/test/field_test.py/FieldAccessorTestCase.test_query_ops_join/original