예제 #1
0
def test_antenna_history_ssc_two_stations_list(ssc_data):
    a = Antenna.get_history("ssc", ["gras", "borr"],
                            ssc_data,
                            source_path="/path/to/ssc")
    assert "gras" in a
    assert "borr" in a
    assert len(a) == 2
예제 #2
0
def test_antenna_history_ssc_two_stations_error(ssc_data):
    # Station xxxx does not exist
    with pytest.raises(MissingDataError):
        a = Antenna.get_history("ssc",
                                "zimm,xxxx",
                                ssc_data,
                                source_path="/path/to/ssc")
예제 #3
0
def test_antenna_history_sinex_one_station_error(sinex_data):
    # Station xxxx does not exist
    with pytest.raises(MissingDataError):
        a = Antenna.get_history("snx",
                                "xxxx",
                                sinex_data,
                                source_path="/path/to/sinex")
예제 #4
0
def test_antenna_history_sinex_two_stations_list(sinex_data):
    a = Antenna.get_history("snx", ["zimm", "hrao"],
                            sinex_data,
                            source_path="/path/to/sinex")
    assert "zimm" in a
    assert "hrao" in a
    assert len(a) == 2
예제 #5
0
def test_antenna_sinex_two_stations_error(sinex_data):
    # Station xxxx does not exist
    with pytest.raises(MissingDataError):
        a = Antenna.get("snx",
                        "zimm,xxxx",
                        datetime.datetime(2020, 1, 1),
                        sinex_data,
                        source_path="/path/to/sinex")
예제 #6
0
def test_antenna_sinex_two_stations_list(sinex_data):
    a = Antenna.get("snx", ["zimm", "hrao"],
                    datetime.datetime(2020, 1, 1),
                    sinex_data,
                    source_path="/path/to/sinex")
    assert "zimm" in a
    assert "hrao" in a
    assert len(a) == 2
예제 #7
0
def test_antenna_sinex_one_station_uppercase(sinex_data):
    a = Antenna.get("snx",
                    "ZIMM",
                    datetime.datetime(2020, 1, 1),
                    sinex_data,
                    source_path="/path/to/sinex")
    assert "zimm" in a
    assert len(a) == 1
예제 #8
0
def test_antenna_ssc_one_station_error(ssc_data):
    # Station xxxx does not exist
    with pytest.raises(MissingDataError):
        a = Antenna.get("ssc",
                        "xxxx",
                        datetime.datetime(2020, 1, 1),
                        ssc_data,
                        source_path="/path/to/ssc")
예제 #9
0
def test_antenna_ssc_two_stations_list(ssc_data):
    a = Antenna.get("ssc", ["gras", "borr"],
                    datetime.datetime(2020, 1, 1),
                    ssc_data,
                    source_path="/path/to/ssc")
    assert "gras" in a
    assert "borr" in a
    assert len(a) == 2
예제 #10
0
def test_antenna_ssc_one_station(ssc_data):
    a = Antenna.get("ssc",
                    "gras",
                    datetime.datetime(2020, 1, 1),
                    ssc_data,
                    source_path="/path/to/ssc")
    assert "gras" in a
    assert len(a) == 1

    # Test antenna information
    assert a["gras"] is None
예제 #11
0
def test_antenna_history_sinex_one_station(sinex_data):
    a = Antenna.get_history("snx",
                            "zimm",
                            sinex_data,
                            source_path="/path/to/sinex")
    assert "zimm" in a
    assert len(a) == 1

    # Test antenna history information
    assert len(a["zimm"].history) == 2
    assert len(a["zimm"].date_from) == 2
    assert len(a["zimm"].date_to) == 2
예제 #12
0
def test_antenna_history_ssc_one_station(ssc_data):
    a = Antenna.get_history("ssc",
                            "gras",
                            ssc_data,
                            source_path="/path/to/ssc")
    assert "gras" in a
    assert len(a) == 1

    # Test antenna history information
    assert a["gras"].history is None
    assert a["gras"].date_from is None
    assert a["gras"].date_to is None
예제 #13
0
def test_antenna_sinex_one_station(sinex_data):
    a = Antenna.get("snx",
                    "zimm",
                    datetime.datetime(2020, 1, 1),
                    sinex_data,
                    source_path="/path/to/sinex")
    assert "zimm" in a
    assert len(a) == 1

    # Test antenna information
    assert a["zimm"].date_from == datetime.datetime(1998, 11, 6, 0, 0)
    assert a["zimm"].date_to == datetime.datetime(9999, 12, 31, 23, 59, 59,
                                                  999999)
    assert a["zimm"].station == 'zimm'
    assert a["zimm"].radome_serial_number == 'NONE'
    assert a["zimm"].radome_type == 'NONE'
    assert a["zimm"].serial_number == '99390'
    assert a["zimm"].type == 'TRM29659.00'