def test_failureConstructionFindsOriginalFailure(self):
        """
        When a Failure is constructed in the context of an exception
        handler that is handling an exception raised by
        raiseException, the new Failure should be chained to that
        original Failure.
        Means the new failure should still show the same origin frame,
        but with different complete stack trace (as not thrown at same place).
        """
        f = getDivisionFailure()
        f.cleanFailure()
        try:
            f.raiseException()
        except:
            newF = failure.Failure()
            tb = f.getTraceback().splitlines()
            new_tb = newF.getTraceback().splitlines()
            self.assertNotEqual(tb, new_tb)
            self.assertEqual(tb[-3:], new_tb[-3:])
        else:
            self.fail("No exception raised from raiseException!?")

        When a Failure is constructed in the context of an exception
        handler that is handling an exception raised by
        raiseException, the new Failure should be chained to that
        original Failure.
        Means the new failure should still show the same origin frame,
        but with different complete stack trace (as not thrown at same place).
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_failure.py