def assertDestinationAdded(self, programPath):
        """
        Assert that when running under the given program a new destination is
        added by L{redirectLogsForTrial}.

        @param programPath: A path to a program.
        @type programPath: L{str}
        """
        destination = _RedirectLogsForTrial(FakeSys([programPath], b""),
                                            LogPublisher())()
        # If this was not added as destination, removing it will raise an
        # exception:
        try:
            removeDestination(destination)
        except __HOLE__:
            self.fail("Destination was not added.")
dataset/ETHPy150Open ClusterHQ/eliot/eliot/tests/test_twisted.py/RedirectLogsForTrialTests.assertDestinationAdded