Ejemplo n.º 1
0
def test_join_existing_error(datasets):
    with pytest.raises(TypeError):
        join_existing(datasets)

    with pytest.raises(ValueError):
        datasets[0] = datasets[0].rename({'time': 'times'})
        join_existing(datasets, options={'dim': 'time'})
Ejemplo n.º 2
0
def test_join_existing_error(datasets):
    with pytest.raises(
        AggregationError, match=r'Failed to join/concatenate datasets in group with'
    ):
        join_existing(datasets, ['Tair'])

    with pytest.raises(AggregationError):
        datasets[0] = datasets[0].rename({'time': 'times'})
        join_existing(datasets, ['Tair'], options={'dim': 'time'})
Ejemplo n.º 3
0
def test_join_existing(datasets):
    ds = join_existing(datasets, options={'dim': 'time'})
    assert len(ds.time) == len(datasets[0].time) * 2