Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1952,7 +1952,7 @@ def get_checks(self, argument_name):
return sorted(checks)


def get_parser(prog='pep8', version=__version__):
def get_parser(prog='pycodestyle', version=__version__):
"""Create the parser for the program."""
parser = OptionParser(prog=prog, version=version,
usage="%prog [options] input ...")
Expand Down
8 changes: 4 additions & 4 deletions testsuite/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ParserTestCase(unittest.TestCase):

def test_vanilla_ignore_parsing(self):
contents = b"""
[pep8]
[pycodestyle]
ignore = E226,E24
"""
options, args = _process_file(contents)
Expand All @@ -28,7 +28,7 @@ def test_vanilla_ignore_parsing(self):

def test_multiline_ignore_parsing(self):
contents = b"""
[pep8]
[pycodestyle]
ignore =
E226,
E24
Expand All @@ -40,7 +40,7 @@ def test_multiline_ignore_parsing(self):

def test_trailing_comma_ignore_parsing(self):
contents = b"""
[pep8]
[pycodestyle]
ignore = E226,
"""

Expand All @@ -50,7 +50,7 @@ def test_trailing_comma_ignore_parsing(self):

def test_multiline_trailing_comma_ignore_parsing(self):
contents = b"""
[pep8]
[pycodestyle]
ignore =
E226,
E24,
Expand Down
14 changes: 8 additions & 6 deletions testsuite/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def test_print_usage(self):
stdout, stderr, errcode = self.pep8('--help')
self.assertFalse(errcode)
self.assertFalse(stderr)
self.assertTrue(stdout.startswith("Usage: pep8 [options] input"))
self.assertTrue(stdout.startswith(
"Usage: pycodestyle [options] input"))

stdout, stderr, errcode = self.pep8('--version')
self.assertFalse(errcode)
Expand All @@ -63,8 +64,8 @@ def test_print_usage(self):
stdout, stderr, errcode = self.pep8('--obfuscated')
self.assertEqual(errcode, 2)
self.assertEqual(stderr.splitlines(),
["Usage: pep8 [options] input ...", "",
"pep8: error: no such option: --obfuscated"])
["Usage: pycodestyle [options] input ...", "",
"pycodestyle: error: no such option: --obfuscated"])
self.assertFalse(stdout)

self.assertFalse(self._config_filenames)
Expand Down Expand Up @@ -115,8 +116,8 @@ def test_check_noarg(self):
stdout, stderr, errcode = self.pep8()
self.assertEqual(errcode, 2)
self.assertEqual(stderr.splitlines(),
["Usage: pep8 [options] input ...", "",
"pep8: error: input not specified"])
["Usage: pycodestyle [options] input ...", "",
"pycodestyle: error: input not specified"])
self.assertFalse(self._config_filenames)

def test_check_diff(self):
Expand Down Expand Up @@ -178,7 +179,8 @@ def test_check_diff(self):
stdout, stderr, errcode = self.pep8()
self.assertEqual(errcode, 2)
self.assertFalse(stdout)
self.assertTrue(stderr.startswith('Usage: pep8 [options] input ...'))
self.assertTrue(stderr.startswith(
'Usage: pycodestyle [options] input ...'))

# no matching file in the diff
diff_lines[3] = "+++ b/testsuite/lost/E11.py"
Expand Down