def test_evenly_sampled_channel_float64_payload(self): correct = [1.0, 2.0, 3.0, 4.0, 5.0] evenly_sampled_channel = mock.set_payload(self.evenly_sampled_channel, numpy.float64, correct) self.assertArraysEqual( reader_utils.extract_payload(evenly_sampled_channel), numpy.array(correct))
def test_unevenly_sampled_channel_int64_payload(self): correct = [1, 2, 3, 4, 5] unevenly_sampled_channel = mock.set_payload( self.unevenly_sampled_channel, numpy.int64, correct) self.assertArraysEqual( reader_utils.extract_payload(unevenly_sampled_channel), numpy.array(correct))
def test_evenly_sampled_channel_uint32_payload(self): correct = [1, 2, 3, 4, 5] evenly_sampled_channel = mock.set_payload(self.evenly_sampled_channel, numpy.uint32, correct) self.assertArraysEqual( reader_utils.extract_payload(evenly_sampled_channel), numpy.array(correct))