Skip to content
Snippets Groups Projects
Commit e4cbf1ef authored by Hannes Feldt's avatar Hannes Feldt
Browse files

Fix integration tests

parent 2a6cc8ba
No related branches found
No related tags found
1 merge request!1063Fix integration tests
......@@ -4,6 +4,7 @@
"""
Power Hierarchy module integration test
"""
import logging
from tango import DevState, DeviceProxy
......
......@@ -11,7 +11,6 @@ from tangostationcontrol.common.configuration import StationConfiguration
class TestStationConfiguration(BaseIntegrationTestCase):
TEST_CONFIGURATION = """{
"servers": {
"AFH": {
......
......@@ -4,6 +4,7 @@
"""
Power Hierarchy module integration test
"""
import logging
import tangostationcontrol
......
......@@ -4,6 +4,7 @@
"""
Power Hierarchy module integration test
"""
import logging
from tango import Database
......
# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
# Copyright (C) 2025 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: Apache-2.0
import json
......@@ -153,6 +153,28 @@ class TestDeviceObservationField(TestDeviceBase):
}
)
def test_device_boot(self):
"""Test if we can transition off -> on using a warm boot"""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_boot()
def test_device_initialize(self):
"""Test if we can transition to standby"""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_initialize()
def test_device_on(self):
"""Test if we can transition off -> standby -> on"""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_on()
def test_device_read_all_attributes(self):
"""Test if we can read all of the exposed attributes in the ON state.
This test covers the reading logic of all attributes."""
self.proxy.observation_field_settings_RW = self.VALID_JSON
super().test_device_read_all_attributes()
def test_init_valid(self):
"""Initialize an observation with valid JSON"""
......@@ -251,9 +273,9 @@ class TestDeviceObservationField(TestDeviceBase):
self.proxy.observation_field_settings_RW = self.VALID_JSON
self.proxy.Initialise()
self.proxy.On()
expected_bands = [
[2, 2]
] * CS001_TILES # we request every antenna to be in this band, regardless of mask
expected_bands = (
[[2, 2]] * CS001_TILES
) # we request every antenna to be in this band, regardless of mask
self.assertListEqual(
antennafield_proxy.RCU_band_select_RW.tolist(), expected_bands
)
......
......@@ -86,7 +86,6 @@ class TestDeviceProtectionControl(TestDeviceBase):
@pytest.mark.timeout(10)
def test_change_events_received(self):
self.proxy.boot()
self.assertEqual(self.proxy.state(), DevState.ON)
......
......@@ -137,8 +137,8 @@ class TestDigitalbeamPerformance(base.IntegrationTestCase):
self.assertEqual(0, beam.Nr_update_pointing_exceptions_R)
logging.error(
f"Median {statistics.median(results) / 1.e9} Stdev "
f"{statistics.stdev(results) / 1.e9}"
f"Median {statistics.median(results) / 1.0e9} Stdev "
f"{statistics.stdev(results) / 1.0e9}"
)
def test_digitalbeam_multi_tracking_performance(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment