Skip to content
Snippets Groups Projects
Commit 27220095 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-480: flat input arrays on test methods

parent 2531780c
No related branches found
No related tags found
1 merge request!220Resolve L2SS-480 "Delays to beam weights"
......@@ -34,7 +34,7 @@ class TestDeviceBeam(AbstractTestBases.TestDeviceBase):
self.assertIsNotNone(HBAT_delays_r1)
# Verify writing operation does not lead to errors
self.proxy.HBAT_set_pointing(["J2000", "0deg", "0deg"] * 96) # write values to RECV
self.proxy.HBAT_set_pointing(numpy.array([["J2000","0deg","0deg"]] * 96).flatten()) # write values to RECV
HBAT_delays_r2 = numpy.array(recv_proxy.read_attribute('HBAT_BF_delays_RW').value)
self.assertIsNotNone(HBAT_delays_r2)
......
......@@ -12,6 +12,7 @@ from tango.test_context import DeviceTestContext
from tangostationcontrol.devices import beam
import numpy
import mock
from tangostationcontrol.test import base
......@@ -55,7 +56,7 @@ class TestBeamDevice(base.TestCase):
self.assertEqual(DevState.ON, proxy.state())
# verify HBAT_delays method returns the correct dimensions
HBAT_delays = proxy.HBAT_delays([["J2000","0deg","0deg"]] * 96)
HBAT_delays = proxy.HBAT_delays(numpy.array([["J2000","0deg","0deg"]] * 96).flatten())
self.assertEqual((96*16,), HBAT_delays.shape)
def test_HBAT_delays_calculations(self):
......@@ -69,6 +70,6 @@ class TestBeamDevice(base.TestCase):
self.assertEqual(DevState.ON, proxy.state())
# verify if values are actually transformed
HBAT_delays = proxy.HBAT_delays([["J2000","0deg","0deg"]] * 96)
HBAT_delays = proxy.HBAT_delays(numpy.array([["J2000","0deg","0deg"]] * 96).flatten())
HBAT_bf_delays = proxy.calculate_HBAT_bf_delays(HBAT_delays)
self.assertNotEqual(HBAT_delays, HBAT_bf_delays)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment