Exemple #1
0
def test_estimator_lists():
    """[Utils] testing: test dummy estimator and preprocessing formatting."""
    assert_correct_format(ESTIMATORS_PROBA, PREPROCESSING)
    assert_correct_format(ESTIMATORS, PREPROCESSING)
    assert_correct_format(ECM, None)
    assert_correct_format(ECM_PROBA, None)

    assert _assert_format(ESTIMATORS)
    assert _assert_format(ESTIMATORS_PROBA)
    assert _assert_format(ECM)
    assert _assert_format(ECM_PROBA)
    assert _assert_format(PREPROCESSING)
Exemple #2
0
def test_assert_format():
    """[Utils] _assert_format: test correct dict passes."""
    instances = {
        'a': [('ols-1', OLS()), ('ols-2', OLS(offset=1))],
        'b': [OLS(), ('ols-2', OLS(offset=1))]
    }
    assert not _assert_format(instances)
Exemple #3
0
def test_assert_format_list_bad():
    """[Utils] _assert_format: test correct list passes."""
    instances = [('ols-1', OLS()), OLS(offset=1)]
    assert not _assert_format(instances)