Skip to content
Snippets Groups Projects
Commit 4070fef4 authored by Taya Snijder's avatar Taya Snijder
Browse files

corrected several contant usages

parent 987dfdd2
Branches
Tags
1 merge request!470Resolve L2SS-1032 "Use constants in tests"
...@@ -21,7 +21,7 @@ class TestAntennaFieldDevice(AbstractTestBases.TestDeviceBase): ...@@ -21,7 +21,7 @@ class TestAntennaFieldDevice(AbstractTestBases.TestDeviceBase):
super().setUp("STAT/AntennaField/1") super().setUp("STAT/AntennaField/1")
self.proxy.put_property({ self.proxy.put_property({
"RECV_devices": ["STAT/RECV/1"], "RECV_devices": ["STAT/RECV/1"],
"Power_to_RECV_mapping": [1, 1, 1, 0] + [-1] * (MAX_ANTENNA - 4) "Power_to_RECV_mapping": [1, 1, 1, 0] + [-1] * ((DEFAULT_N_HBA_TILES * 2) - 4)
}) })
self.recv_proxy = self.setup_recv_proxy() self.recv_proxy = self.setup_recv_proxy()
self.sdp_proxy = self.setup_sdp_proxy() self.sdp_proxy = self.setup_sdp_proxy()
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
from tango.test_context import DeviceTestContext from tango.test_context import DeviceTestContext
from tangostationcontrol.devices import recv from tangostationcontrol.devices import recv
from tangostationcontrol.common.constants import MAX_ANTENNA, N_elements from tangostationcontrol.common.constants import N_rcu, N_rcu_inp, N_elements
import numpy import numpy
...@@ -29,7 +29,7 @@ class TestRecvDevice(device_base.DeviceTestCase): ...@@ -29,7 +29,7 @@ class TestRecvDevice(device_base.DeviceTestCase):
def test_calculate_HBAT_bf_delay_steps(self): def test_calculate_HBAT_bf_delay_steps(self):
"""Verify HBAT beamforming calculations are correctly executed""" """Verify HBAT beamforming calculations are correctly executed"""
with DeviceTestContext(recv.RECV, properties=self.RECV_PROPERTIES, process=True) as proxy: with DeviceTestContext(recv.RECV, properties=self.RECV_PROPERTIES, process=True) as proxy:
delays = numpy.random.rand(MAX_ANTENNA,N_elements).flatten() delays = numpy.random.rand(N_rcu * N_rcu_inp,N_elements).flatten()
HBAT_bf_delay_steps = proxy.calculate_HBAT_bf_delay_steps(delays) HBAT_bf_delay_steps = proxy.calculate_HBAT_bf_delay_steps(delays)
self.assertEqual(3072, len(HBAT_bf_delay_steps)) # 96x32=3072 self.assertEqual(3072, len(HBAT_bf_delay_steps)) # 96x32=3072
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment