Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 = ['pep8']
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
def tearDown(self):
sys.argv = self._saved_argv
sys.stdout = self._saved_stdout
sys.stderr = self._saved_stderr
pycodestyle.PROJECT_CONFIG = self._saved_pconfig
pycodestyle.RawConfigParser._read = self._saved_cpread
pycodestyle.stdin_get_value = self._saved_stdin_get_value
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
def tearDown(self):
sys.argv = self._saved_argv
sys.stdout = self._saved_stdout
sys.stderr = self._saved_stderr
pycodestyle.PROJECT_CONFIG = self._saved_pconfig
pycodestyle.RawConfigParser._read = self._saved_cpread
pycodestyle.stdin_get_value = self._saved_stdin_get_value
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 = ['pep8']
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
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