def test_receiver_sinex_two_stations_list(sinex_data): r = Receiver.get("snx", ["zimm", "hrao"], datetime.datetime(2020, 1, 1), sinex_data, source_path="/path/to/sinex") assert "zimm" in r assert "hrao" in r assert len(r) == 2
def test_receiver_sinex_two_stations_error(sinex_data): # Station xxxx does not exist with pytest.raises(MissingDataError): r = Receiver.get("snx", "zimm, xxxx", datetime.datetime(2020, 1, 1), sinex_data, source_path="/path/to/sinex")
def test_receiver_sinex_one_station_uppercase(sinex_data): r = Receiver.get("snx", "ZIMM", datetime.datetime(2020, 1, 1), sinex_data, source_path="/path/to/sinex") assert "zimm" in r assert len(r) == 1
def test_receiver_ssc_two_stations_error(ssc_data): # Station xxxx does not exist with pytest.raises(MissingDataError): r = Receiver.get("ssc", "gras,xxxx", datetime.datetime(2020, 1, 1), ssc_data, source_path="/path/to/ssc")
def test_receiver_ssc_two_stations_list(ssc_data): r = Receiver.get("ssc", ["gras", "borr"], datetime.datetime(2020, 1, 1), ssc_data, source_path="/path/to/ssc") assert "gras" in r assert "borr" in r assert len(r) == 2
def test_receiver_ssc_one_station(ssc_data): r = Receiver.get("ssc", "gras", datetime.datetime(2020, 1, 1), ssc_data, source_path="/path/to/ssc") assert "gras" in r assert len(r) == 1 # Test receiver information assert r["gras"] is None
def test_receiver_sinex_one_station(sinex_data): r = Receiver.get("snx", "zimm", datetime.datetime(2020, 1, 1), sinex_data, source_path="/path/to/sinex") assert "zimm" in r assert len(r) == 1 # Test receiver information assert r["zimm"].station == "zimm" assert r["zimm"].type == 'TRIMBLE NETR9' assert r["zimm"].serial_number == '5429R' assert r["zimm"].firmware == '5.37' assert r["zimm"].date_from == datetime.datetime(2018, 12, 18, 9, 45) assert r["zimm"].date_to == datetime.datetime(2020, 6, 8, 7, 15)