def __call__(self, result):
        """Update test result with the lines in the TAP file.

        Provide the interface that TestCase provides to a suite or runner.
        """
        result.startTest(self)

        if self._line.skip:
            try:
                result.addSkip(None, self._line.directive.reason)
            except AttributeError:
                # Python 2.6 does not support skipping.
                result.addSuccess(self)
            return

        if self._line.todo:
            if self._line.ok:
                try:
                    result.addUnexpectedSuccess(self)
                except AttributeError:
                    # Python 2.6 does not support unexpected success.
                    self.addFailure(result)
            else:
                try:
                    result.addExpectedFailure(
                        self, (Exception, Exception(), None))
                except __HOLE__:
                    # Python 2.6 does not support expected failures.
                    result.addSuccess(self)
            return

        if self._line.ok:
            result.addSuccess(self)
        else:
            self.addFailure(result)
dataset/ETHPy150Open mblayman/tappy/tap/adapter.py/Adapter.__call__