From e98acd96c7c79f789cc99c5a308b50ddb7bc8d6b Mon Sep 17 00:00:00 2001 From: crnbaker Date: Mon, 5 Jun 2023 14:22:48 +0100 Subject: [PATCH] hotfix - casting hub child cards to AbstractSpectrumCard in test_star_hub.py --- src/tests/test_star_hub.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tests/test_star_hub.py b/src/tests/test_star_hub.py index 73c0023..4991373 100644 --- a/src/tests/test_star_hub.py +++ b/src/tests/test_star_hub.py @@ -1,8 +1,10 @@ +from typing import cast + import pytest from numpy import array from spectrum_gmbh.regs import SPC_CHENABLE -from spectrumdevice import SpectrumDigitiserChannel, SpectrumDigitiserStarHub +from spectrumdevice import AbstractSpectrumCard, SpectrumDigitiserChannel, SpectrumDigitiserStarHub from spectrumdevice.exceptions import SpectrumInvalidNumberOfEnabledChannels from spectrumdevice.settings.channel import SpectrumChannelName from spectrumdevice.settings.transfer_buffer import CardToPCDataTransferBuffer @@ -51,7 +53,7 @@ def test_get_channels(self) -> None: expected_channels = [] for n in range(NUM_CARDS_IN_STAR_HUB): expected_channels += [ - SpectrumDigitiserChannel(i, self._device._child_cards[n]) + SpectrumDigitiserChannel(i, cast(AbstractSpectrumCard, self._device._child_cards[n])) for i in range(self._expected_num_channels_each_card) ] expected_channels_tuple = tuple(expected_channels)