Check that the sub-devices of CompositeDevice are actually Device instances

This commit is contained in:
Andrew Scheller
2016-04-10 14:54:30 +01:00
parent 05560f64c7
commit 8e09a077fd
4 changed files with 12 additions and 0 deletions

View File

@@ -118,6 +118,10 @@ def test_composite_device_bad_init():
CompositeDevice(foo=1, bar=2, _order=('foo',))
with pytest.raises(ValueError):
CompositeDevice(close=1)
with pytest.raises(ValueError):
CompositeDevice(2)
with pytest.raises(ValueError):
CompositeDevice(MockPin(2))
def test_composite_device_read_only():
device = CompositeDevice(