def test_reshape_metadata(self, quiet=True): param = qcodes.ManualParameter('dummy') data_set = qcodes.loops.Loop(param[0:1:10]).each(param).run(quiet=quiet) metadata = reshape_metadata(data_set, printformat='dict') self.assertTrue(metadata.startswith('dataset')) data_set.metadata['scanjob'] = {'scanjobdict': True} metadata = reshape_metadata(data_set, printformat='dict') self.assertIn('scanjobdict', metadata)
def test_reshape_metadata_station(self): instr = qcodes.Instrument(qtt.measurements.scans.instrumentName('_dummy_test_reshape_metadata_123')) st = qcodes.Station(instr) result = reshape_metadata(st, printformat='dict') instr.close() self.assertTrue('_dummy_test_reshape_metadata_123' in result) self.assertTrue(isinstance(result, str)) self.assertFalse('(' in result) self.assertFalse(')' in result)