def test_convert_pulses_fast(self): pulses_fast = [ pulse - pulse * TestNecDecoder.time_tolerance for pulse in TestNecDecoder.reference_pulses ] decoder = NecDecoder() start = decoder._find_start_index(TestNecDecoder.reference_pulses) assert TestNecDecoder.reference_bits == decoder._convert_pulses( pulses_fast, start)
def test_convert_pulses_valid(self): decoder = NecDecoder() start = decoder._find_start_index(TestNecDecoder.reference_pulses) assert TestNecDecoder.reference_bits == decoder._convert_pulses( TestNecDecoder.reference_pulses, start)