コード例 #1
0
def test_check_format():
    """[Utils] _check_format: test proper instance list passes test."""

    instances = [('ols-1', OLS()), ('ols-2', OLS(offset=1))]
    assert _check_format(instances)
コード例 #2
0
def test_check_format_empty():
    """[Utils] _check_format: test empty list passes."""
    assert _check_format([])
コード例 #3
0
def test_check_format_non_est():
    """[Utils] _check_format: test non-est instance does not pass."""

    instances = (('ols-1', dict()), ('ols-2', OLS(offset=1)))
    assert not _check_format(instances)
コード例 #4
0
def test_check_format_iterable():
    """[Utils] _check_format: test tuple iterable does not pass."""

    instances = (('ols-1', OLS()), ('ols-2', OLS(offset=1)))
    assert not _check_format(instances)
コード例 #5
0
def test_check_format_no_name():
    """[Utils] _check_format: test non-named instance does not pass."""

    instances = [('ols-1', OLS()), OLS()]
    assert not _check_format(instances)
コード例 #6
0
def test_check_format_duplicate():
    """[Utils] _check_format: test duplicate names does not pass."""

    instances = [('ols-1', OLS()), ('ols-1', OLS(offset=1))]
    assert not _check_format(instances)