def setUp(self): self.print_patch = patch.object(six, 'print_').start() self.addCleanup(patch.stopall)