def setUp(self): self._saved_stdout = sys.stdout self._saved_stderr = sys.stderr self._saved_checks = pep8._checks sys.stdout = PseudoFile() sys.stderr = PseudoFile() pep8._checks = dict( (k, dict((f, (vals[0][:], vals[1])) for (f, vals) in v.items())) for (k, v) in self._saved_checks.items())
def setUp(self): self._saved_stdout = sys.stdout self._saved_stderr = sys.stderr self._saved_checks = pycodestyle._checks sys.stdout = PseudoFile() sys.stderr = PseudoFile() pycodestyle._checks = { k: {f: (vals[0][:], vals[1]) for (f, vals) in v.items()} for k, v in self._saved_checks.items() }
def setUp(self): self._saved_argv = sys.argv self._saved_stdout = sys.stdout self._saved_stderr = sys.stderr self._saved_pconfig = pycodestyle.PROJECT_CONFIG self._saved_cpread = pycodestyle.RawConfigParser._read self._saved_stdin_get_value = pycodestyle.stdin_get_value self._config_filenames = [] self.stdin = '' sys.argv = ['pycodestyle'] sys.stdout = PseudoFile() sys.stderr = PseudoFile() def fake_config_parser_read(cp, fp, filename): self._config_filenames.append(filename) pycodestyle.RawConfigParser._read = fake_config_parser_read pycodestyle.stdin_get_value = self.stdin_get_value