add more tests and fixes for command inheritance
- fix CommandType.__repr__ - secop/modules.py: command properties are allowed to be configured: - section 2: remove comment and rename - section 3: all accessible properties should be checked - command description should be inherited also when taken from docstring - move test for command inheritance to test_modules.py - added tests to check for valid properties of commands Change-Id: I5fd04e03be1faec5e54fed9735620bc5dc0f89c0
This commit is contained in:
@ -955,10 +955,9 @@ class CommandType(DataType):
|
||||
return props
|
||||
|
||||
def __repr__(self):
|
||||
argstr = repr(self.argument) if self.argument else ''
|
||||
if self.result is None:
|
||||
return 'CommandType(%s)' % argstr
|
||||
return 'CommandType(%s, %s)' % (argstr, repr(self.result))
|
||||
return 'CommandType(%s)' % (repr(self.argument) if self.argument else '')
|
||||
return 'CommandType(%s, %s)' % (repr(self.argument), repr(self.result))
|
||||
|
||||
def __call__(self, value):
|
||||
"""return the validated argument value or raise"""
|
||||
|
Reference in New Issue
Block a user