From 324290b87bf7c832f41f2de8baf06effbdb81047 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Sat, 3 Feb 2024 11:32:22 +0100 Subject: [PATCH] Fix issue in fixtures --- src/qcodes/tests/dataset/conftest.py | 12 +++++++----- tests/dataset/conftest.py | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/qcodes/tests/dataset/conftest.py b/src/qcodes/tests/dataset/conftest.py index ff8e107afc65..f638577d0ef1 100644 --- a/src/qcodes/tests/dataset/conftest.py +++ b/src/qcodes/tests/dataset/conftest.py @@ -593,9 +593,7 @@ def __init__(self, name, instrument, **kwargs): self.start = 0 self.stop = 2e6 - class Spectrum(BaseSpectrum): - - def get_raw(self): + def get_data(self): # This is how it should be: the setpoints are generated at the # time we get. But that will of course not work with the old Loop self.setpoints = (tuple(np.linspace(self.start, self.stop, @@ -603,6 +601,10 @@ def get_raw(self): # not the best SA on the market; it just returns noise... return np.random.randn(self.npts) + class Spectrum(BaseSpectrum): + def get_raw(self): + return super().get_data() + class MultiDimSpectrum(ArrayParameter): def __init__(self, name, instrument, **kwargs): @@ -635,13 +637,13 @@ def get_raw(self): class ListSpectrum(BaseSpectrum): def get_raw(self): - output = super().get_raw() + output = super().get_data() return list(output) class TupleSpectrum(BaseSpectrum): def get_raw(self): - output = super().get_raw() + output = super().get_data() return tuple(output) SA = DummyInstrument('dummy_SA') diff --git a/tests/dataset/conftest.py b/tests/dataset/conftest.py index 2c968b431518..499b444de305 100644 --- a/tests/dataset/conftest.py +++ b/tests/dataset/conftest.py @@ -592,9 +592,7 @@ def __init__(self, name, instrument, **kwargs): self.start = 0 self.stop = 2e6 - class Spectrum(BaseSpectrum): - - def get_raw(self): + def get_data(self): # This is how it should be: the setpoints are generated at the # time we get. But that will of course not work with the old Loop self.setpoints = (tuple(np.linspace(self.start, self.stop, @@ -602,6 +600,10 @@ def get_raw(self): # not the best SA on the market; it just returns noise... return np.random.randn(self.npts) + class Spectrum(BaseSpectrum): + def get_raw(self): + return super().get_data() + class MultiDimSpectrum(ArrayParameter): def __init__(self, name, instrument, **kwargs): @@ -634,13 +636,13 @@ def get_raw(self): class ListSpectrum(BaseSpectrum): def get_raw(self): - output = super().get_raw() + output = super().get_data() return list(output) class TupleSpectrum(BaseSpectrum): def get_raw(self): - output = super().get_raw() + output = super().get_data() return tuple(output) SA = DummyInstrument('dummy_SA')