Skip to content

Commit

Permalink
hotfix - casting hub child cards to AbstractSpectrumCard in test_star…
Browse files Browse the repository at this point in the history
…_hub.py
  • Loading branch information
crnbaker committed Jun 5, 2023
1 parent fc5aa0b commit e98acd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tests/test_star_hub.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e98acd9

Please sign in to comment.