def test_forceGc(self):
        """
        Passing the --force-gc option to the trial script forces the garbage
        collector to run before and after each test.
        """
        self.config['force-gc'] = True
        self.config.postOptions()
        runner = self.makeRunner()
        runner.run(self.test)
        self.assertEqual(self.log, ['collect', 'test', 'collect',
                                    'collect', 'test', 'collect'])

        Passing the --force-gc option to the trial script forces the garbage
        collector to run before and after each test.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_script.py