def test_warningEmittedForNewTest(self):
        test = self.__class__('test_warningEmittedForNewTest')
        self.result.startTest(test)

        # Clear whatever startTest wrote to the stream
        self.stream.seek(0)
        self.stream.truncate()

        # Emit a warning (and incidentally, assert that it was emitted)
        self.test_warning()

        # Clean up from the first warning to simplify the rest of the
        # assertions.
        self.stream.seek(0)
        self.stream.truncate()

        # Stop the first test and start another one (it just happens to be the
        # same one, but that doesn't matter)
        self.result.stopTest(test)
        self.result.startTest(test)

        # Clean up the stopTest/startTest output
        self.stream.seek(0)
        self.stream.truncate()

        # Emit the warning again and make sure it shows up
        self.test_warning()
A warning emitted again after a new test has started is written to the
dataset/ETHPy150Open twisted/twisted/twisted/trial/test/test_reporter.py/ReporterTests.test_warningEmittedForNewTest