def test_receiver_history_ssc_two_stations_error(ssc_data): # Station xxxx does not exist with pytest.raises(MissingDataError): r = Receiver.get_history("ssc", "gras,xxxx", ssc_data, source_path="/path/to/ssc")
def test_receiver_history_ssc_two_stations_list(ssc_data): r = Receiver.get_history("ssc", ["gras", "borr"], ssc_data, source_path="/path/to/ssc") assert "gras" in r assert "borr" in r assert len(r) == 2
def test_receiver_history_sinex_two_stations_error(sinex_data): # Station xxxx does not exist with pytest.raises(MissingDataError): r = Receiver.get_history("snx", "zimm, xxxx", sinex_data, source_path="/path/to/sinex")
def test_receiver_history_sinex_two_stations_list(sinex_data): r = Receiver.get_history("snx", ["zimm", "hrao"], sinex_data, source_path="/path/to/sinex") assert "zimm" in r assert "hrao" in r assert len(r) == 2
def test_receiver_history_sinex_one_station(sinex_data): r = Receiver.get_history("snx", "zimm", sinex_data, source_path="/path/to/sinex") assert "zimm" in r assert len(r) == 1 # Test receiver history information assert len(r["zimm"].history) == 16 assert len(r["zimm"].date_from) == 16 assert len(r["zimm"].date_to) == 16
def test_receiver_history_ssc_one_station(ssc_data): r = Receiver.get_history("ssc", "gras", ssc_data, source_path="/path/to/ssc") assert "gras" in r assert len(r) == 1 # Test receiver history information assert r["gras"].history is None assert r["gras"].date_from is None assert r["gras"].date_to is None