def test_patchRestoredAfterRun(self):
        """
        Any monkey patches introduced by a test using C{patch()} are reverted
        after the test has run.
        """
        self.test.patch(self, 'objectToPatch', self.patchedValue)
        self.test.run(reporter.Reporter())
        self.assertEqual(self.objectToPatch, self.originalValue)

        Any monkey patches introduced by a test using C{patch()} are reverted
        after the test has run.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_tests.py