Esempio n. 1
0
def test_has_dataset_fail():
    """Test if check works to fail for an empty list."""
    obj = []
    with pytest.raises(DatasetError) as e:
        has_dataset(obj, "test", "something")
    assert "You need to add at least one test dataset" in str(e.value)
Esempio n. 2
0
def test_has_dataset():
    """Test if check works for a non-empty list."""
    obj = [5]
    assert has_dataset(obj, "list", "something")