Esempio n. 1
0
def test_SedimentConcentrationObservations_table_emptyconnection():
    connection = {}
    conc_obs = observation.SedimentConcentrationObservations(
        data=test_table_mismatch, connection=connection)
    assert type(conc_obs._data) is pd.DataFrame
    assert conc_obs._data.shape[0] == 5
    assert conc_obs._data.shape[1] == 4
Esempio n. 2
0
def test_SedimentConcentrationObservations_table_index_direct_connection():
    connection = {'concentration': 'conc'}
    conc_obs = observation.SedimentConcentrationObservations(
        data=test_table_mismatch, connection=connection)
    returned = conc_obs.conc
    assert len(returned) == conc_obs.shape[0]
    assert returned[0] == test_table_mismatch.loc[0, 'conc']
Esempio n. 3
0
def test_SedimentConcentrationObservations_table_noconnection_asDFmethod():
    conc_obs = observation.SedimentConcentrationObservations(data=test_table)
    assert type(conc_obs._data) is pd.DataFrame
    assert conc_obs._data.shape[0] == 5
    assert conc_obs._data.shape[1] == 3