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:
2021-11-12 17:07:11 +01:00
parent 9058ef054b
commit 1d9e07edb4
5 changed files with 157 additions and 24 deletions

View File

@@ -98,6 +98,12 @@ def test_Override():
Mod.p1.default = False
assert repr(Mod.p1) == repr(Base.p1)
for cls in locals().values():
if hasattr(cls, 'accessibles'):
for p in cls.accessibles.values():
assert isinstance(p.ownProperties, dict)
assert p.copy().ownProperties == {}
def test_Export():
class Mod(HasAccessibles):