def make_row(entry): channels = dict(('channel_{}'.format(ch.name), ch.trimmed_y) for ch in entry.channels) parameters = map_keys('parameter_{}'.format, entry.parameters) properties = map_keys('property_{}'.format, entry.properties) r = {} r.update(entry.system_properties) r.update(channels) r.update(parameters) r.update(properties) return r
def test_non_empty_map(self): # when mapped_dict = map_keys(times_2, {2: 'a', 3: 'b'}) # then self.assertEqual({4: 'a', 6: 'b'}, mapped_dict)
def test_empty_map(self): # when mapped_dict = map_keys(times_2, {}) # then self.assertEqual({}, mapped_dict)
def test_non_empty_map(self): # when mapped_dict = map_keys(times_2, {2: "a", 3: "b"}) # then self.assertEqual({4: "a", 6: "b"}, mapped_dict)