summaryrefslogtreecommitdiff
path: root/cliff/tests/test_app.py
diff options
context:
space:
mode:
Diffstat (limited to 'cliff/tests/test_app.py')
-rw-r--r--cliff/tests/test_app.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/cliff/tests/test_app.py b/cliff/tests/test_app.py
index 5f13007..e3bc12e 100644
--- a/cliff/tests/test_app.py
+++ b/cliff/tests/test_app.py
@@ -374,3 +374,16 @@ def test_error_encoding_sys():
app.stderr.write(u_data)
actual = stderr.getvalue()
assert data == actual
+
+
+def test_unknown_cmd():
+ app, command = make_app()
+ assert app.run(['hell']) == 2
+
+
+def test_unknown_cmd_debug():
+ app, command = make_app()
+ try:
+ app.run(['--debug', 'hell']) == 2
+ except ValueError as err:
+ assert "['hell']" in ('%s' % err)