コード例 #1
0
def test_find_all_abnormal_string(s, letter):
    """Test find_all behaviour called with wrong objects."""
    with pytest.raises(TypeError):
        next(_find_all(s, letter))
コード例 #2
0
def test_find_all_none_string(s, letter):
    """Test find_all behaviour for empty cases."""
    with pytest.raises(StopIteration):
        assert next(_find_all(s, letter))
コード例 #3
0
def test_find_all_normal_string(s, letter, occur):
    """Test find_all behaviour for average cases."""
    assert tuple(_find_all(s, letter)) == occur
コード例 #4
0
ファイル: test_text.py プロジェクト: MSusik/beard
def test_find_all_abnormal_string(s, letter):
    """Test find_all behaviour called with wrong objects."""
    with pytest.raises(TypeError):
        next(_find_all(s, letter))
コード例 #5
0
ファイル: test_text.py プロジェクト: MSusik/beard
def test_find_all_none_string(s, letter):
    """Test find_all behaviour for empty cases."""
    with pytest.raises(StopIteration):
        assert next(_find_all(s, letter))
コード例 #6
0
ファイル: test_text.py プロジェクト: MSusik/beard
def test_find_all_normal_string(s, letter, occur):
    """Test find_all behaviour for average cases."""
    assert tuple(_find_all(s, letter)) == occur