summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kronos/cli.py6
-rw-r--r--kronos/tests/test_cli.py6
2 files changed, 7 insertions, 5 deletions
diff --git a/kronos/cli.py b/kronos/cli.py
index 72f0676..9e3e3bf 100644
--- a/kronos/cli.py
+++ b/kronos/cli.py
@@ -46,9 +46,5 @@ class CommandLineUI(object):
46 controller(self.activity) 46 controller(self.activity)
47 47
48 48
49def main():
50 CommandLineUI(sys.argv[:]).run()
51
52
53if __name__ == "__main__": 49if __name__ == "__main__":
54 main() 50 CommandLineUI(sys.argv[:]).run()
diff --git a/kronos/tests/test_cli.py b/kronos/tests/test_cli.py
index 54aef81..a826a7e 100644
--- a/kronos/tests/test_cli.py
+++ b/kronos/tests/test_cli.py
@@ -34,3 +34,9 @@ class TestParsingErrors(object):
34 def test_should_exit_if_not_enough_args(self): 34 def test_should_exit_if_not_enough_args(self):
35 ui = CommandLineUI([]) 35 ui = CommandLineUI([])
36 assert_raises(SystemExit, ui.run) 36 assert_raises(SystemExit, ui.run)
37
38 def test_should_exit_if_invalid_controller(self):
39 args = ['kronos', 'ducks', 'my action@home', '#stuff', '#good']
40 ui = CommandLineUI(args)
41
42 assert_raises(SystemExit, ui.run)