Esempio n. 1
0
def test_match_initialized_dims(da1, da2):
    """Test if check works if both da has the proper dims."""
    assert match_initialized_dims(da1.rename({"y": "init"}),
                                  da2.rename({"y": "time"}))
Esempio n. 2
0
def test_match_initialized_dims_fail(da1, da2):
    """Test if check works if the da does not have the proper dims."""
    with pytest.raises(DimensionError) as e:
        match_initialized_dims(da1.rename({"y": "init"}),
                               da2.rename({"y": "not_time"}))
    assert "Dimensions must match initialized prediction" in str(e.value)
Esempio n. 3
0
def test_match_initialized_dims(da1, da2):
    """Test if check works if both da has the proper dims."""
    assert match_initialized_dims(da1.rename({'y': 'init'}),
                                  da2.rename({'y': 'time'}))