def test_decode_compressed_longitude_invalid_longitude(): with pytest.raises(ValueError): # Length must be 4 APRSUtils.decode_compressed_longitude("<*e77")
def test_decode_compressed_longitude_invalid_value(): with pytest.raises(ParseError): # Results in an invalid longitude APRSUtils.decode_compressed_longitude(" *e7")
def test_decode_compressed_longitude(): # Test compressed longitude lng = APRSUtils.decode_compressed_longitude("<*e7") assert lng == -72.750004