'L{FirstError} instances compare equal to each other if and only if
their failure and index compare equal.  L{FirstError} instances do not
compare equal to instances of other types.'

def test_comparison(self):

    try:
        (1 // 0)
    except:
        firstFailure = failure.Failure()
    one = defer.FirstError(firstFailure, 13)
    anotherOne = defer.FirstError(firstFailure, 13)
    try:
        raise ValueError('bar')
    except:
        secondFailure = failure.Failure()
    another = defer.FirstError(secondFailure, 9)
    self.assertTrue((one == anotherOne))
    self.assertFalse((one == another))
    self.assertTrue((one != another))
    self.assertFalse((one != anotherOne))
    self.assertFalse((one == 10))
