update 2023-05-30 from gitmlz
Change-Id: I0b1eb2941692fde5c9d98f107fc38315625dcfdb
This commit is contained in:
@ -28,7 +28,7 @@ import pytest
|
||||
|
||||
from frappy.datatypes import BoolType, FloatRange, StringType, IntRange, ScaledInteger
|
||||
from frappy.errors import ProgrammingError, ConfigError, RangeError
|
||||
from frappy.modules import Communicator, Drivable, Readable, Module
|
||||
from frappy.modules import Communicator, Drivable, Readable, Module, Writable
|
||||
from frappy.params import Command, Parameter, Limit
|
||||
from frappy.rwhandler import ReadHandler, WriteHandler, nopoll
|
||||
from frappy.lib import generalConfig
|
||||
@ -245,7 +245,7 @@ def test_ModuleMagic():
|
||||
'group', 'export', 'relative_resolution',
|
||||
'visibility', 'unit', 'default', 'value', 'datatype', 'fmtstr',
|
||||
'absolute_resolution', 'max', 'min', 'readonly', 'constant',
|
||||
'description', 'needscfg', 'update_unchanged'}
|
||||
'description', 'needscfg', 'update_unchanged', 'influences'}
|
||||
|
||||
# check on the level of classes
|
||||
# this checks Newclass1 too, as it is inherited by Newclass2
|
||||
@ -902,3 +902,17 @@ def test_limit_inheritance():
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
mod2.write_a(0)
|
||||
|
||||
@pytest.mark.parametrize('bases, iface_classes', [
|
||||
([Module], ()),
|
||||
([Communicator], ('Communicator',)),
|
||||
([Readable], ('Readable',)),
|
||||
([Writable], ('Writable',)),
|
||||
([Drivable], ('Drivable',)),
|
||||
])
|
||||
def test_interface_classes(bases, iface_classes):
|
||||
srv = ServerStub({})
|
||||
class Mod(*bases):
|
||||
pass
|
||||
m = Mod('mod', LoggerStub(), {'description': 'test'}, srv)
|
||||
assert m.interface_classes == iface_classes
|
||||
|
Reference in New Issue
Block a user