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

fix tests

parent 47baba41
No related branches found
No related tags found
1 merge request!93L2SS-1582: Fix handling of closing streams on HDF5 files
Pipeline #83866 passed
......@@ -122,6 +122,7 @@ tox -e debug tests.requests.test_prometheus
## Release notes
- 0.18.9 - Fix handling of closing streams on HDF5 files
- 0.18.8 - Migrate case insensitive dict from station control
- 0.18.7 - Add support for various ZeroMQ package receivers
- 0.18.6 - Compatability with new black versions
......
0.18.8
0.18.9
# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: Apache-2.0
......@@ -108,6 +108,7 @@ class StatisticsParser:
logger.debug("Parsing hdf5 statistics file")
with hdf5_file as statistic_data:
hdf5_file.load(statistic_data)
if self.file_header is None:
self.file_header = statistic_data
elif not StatisticsFileHeader.__eq__(self.file_header, statistic_data):
......
# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: Apache-2.0
import sys
from os.path import dirname, isfile
from tempfile import TemporaryDirectory
from typing import Tuple
from unittest import mock
from unittest.mock import patch
from typing import Tuple
import sys
import h5py
import numpy
from lofar_station_client import __version__ as lsc_version
from lofar_station_client.dts.constants import N_pol
from lofar_station_client.statistics.reader import entry as reader_entry
from lofar_station_client.statistics.statistics_data import (
StatisticsData,
StatisticsFileHeader,
......@@ -20,8 +23,7 @@ from lofar_station_client.statistics.writer import (
hdf5,
__version__ as writer_version,
)
from lofar_station_client import __version__ as lsc_version
from lofar_station_client.statistics.reader import entry as reader_entry
from tests import base
from tests.test_devices import (
FakeAntennaFieldDeviceProxy,
FakeOffAntennaFieldDeviceProxy,
......@@ -31,7 +33,6 @@ from tests.test_devices import (
FakeSDPFirmwareDeviceProxy,
FakeStationManagerDeviceProxy,
)
from tests import base
class TestStatisticsReaderWriter(base.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment