Skip to content

Commit

Permalink
renaming wc --> wc-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Jan 23, 2019
1 parent 3b73442 commit 084663b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
package_data=md.package_data,
entry_points={
'console_scripts': [
'wc = wc_cli.__main__:main',
'wc-cli = wc_cli.__main__:main',
],
},
install_requires=md.install_requires,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ def tearDown(self):
os.remove(self.filename)

def test_cli(self):
with mock.patch('sys.argv', ['wc', '--help']):
with mock.patch('sys.argv', ['wc-cli', '--help']):
with self.assertRaises(SystemExit) as context:
__main__.main()
self.assertRegex(context.Exception, 'usage: wc')
self.assertRegex(context.Exception, 'usage: wc-cli')

def test_help(self):
with self.assertRaises(SystemExit):
with __main__.App(argv=['--help']) as app:
app.run()
self.assertRegex(context.Exception, 'usage: wc')
self.assertRegex(context.Exception, 'usage: wc-cli')

with capturer.CaptureOutput(merged=False, relay=False) as captured:
with __main__.App(argv=[]) as app:
app.run()
self.assertRegex(captured.stdout.get_text(), 'usage: wc')
self.assertRegex(captured.stdout.get_text(), 'usage: wc-cli')
self.assertEqual(captured.stderr.get_text(), '')

def test_version(self):
Expand Down
2 changes: 1 addition & 1 deletion wc_cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _default(self):
class App(cement.App):
""" Command line application """
class Meta:
label = 'wc'
label = 'wc-cli'
base_controller = 'base'
handlers = []

Expand Down

0 comments on commit 084663b

Please sign in to comment.