Esempio n. 1
0
 def tearDown(self):
     """Restore the output and input methods."""
     config.cosmetic_changes_mylang_only = self.old_cc_setting
     bot.ui._raw_input = self.orig_raw_input
     bot.ui.output = self.orig_output
     bot.set_interface('buffer')
     super().tearDown()
Esempio n. 2
0
 def setUp(self):
     """Patch the output and input methods."""
     super().setUp()
     bot.set_interface('terminal')
     self.output_text = ''
     self.orig_raw_input = bot.ui._raw_input
     self.orig_output = bot.ui.stream_output
     bot.ui._raw_input = lambda *args, **kwargs: 'dummy input'
     bot.ui.stream_output = self._capture_output
     self.old_cc_setting = config.cosmetic_changes_mylang_only