From b9820311d53796d1e9b2ba616696d82b8b3b47d6 Mon Sep 17 00:00:00 2001 From: thijs snijder <snijder@astron.nl> Date: Tue, 14 Dec 2021 11:50:16 +0100 Subject: [PATCH] fixed unit test bugs --- .../tangostationcontrol/test/clients/test_client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_client.py b/tangostationcontrol/tangostationcontrol/test/clients/test_client.py index ea03e850d..577bab69e 100644 --- a/tangostationcontrol/tangostationcontrol/test/clients/test_client.py +++ b/tangostationcontrol/tangostationcontrol/test/clients/test_client.py @@ -73,8 +73,12 @@ class test_client(CommClient): """ takes all gathered data to configure and return the correct read and write functions """ - - self.value = numpy.zeros(dims, dtype) + if dtype == str and dims == (1,): + self.value = '' + elif dims == (1,): + self.value = dtype(0) + else: + self.value = numpy.zeros(dims, dtype) def read_function(): logger.debug("from read_function, reading {} array of type {}".format(dims, dtype)) -- GitLab