From 2d6c7e3adb47787ba7c38c303fd1f528f7d52a13 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 26 Sep 2013 16:44:37 +0200 Subject: frontend: report arguments errors with better detail When reporting argument errors, show also a context -- what is processed, what is the name of the command. --- ipatests/test_ipalib/test_frontend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipatests/test_ipalib') diff --git a/ipatests/test_ipalib/test_frontend.py b/ipatests/test_ipalib/test_frontend.py index 310d7a53d..ce943a7e9 100644 --- a/ipatests/test_ipalib/test_frontend.py +++ b/ipatests/test_ipalib/test_frontend.py @@ -280,7 +280,7 @@ class test_Command(ClassChecker): # Test ValueError, required after optional: e = raises(ValueError, self.get_instance, args=('arg1?', 'arg2')) - assert str(e) == 'arg2: required argument after optional' + assert str(e) == "arg2: required argument after optional in %s arguments ['arg1?', 'arg2']" % (self.get_instance().name) # Test ValueError, scalar after multivalue: e = raises(ValueError, self.get_instance, args=('arg1+', 'arg2')) -- cgit