def test_seq_groups_raises():
    """
    https://stackoverflow.com/questions/66566960/pytest-raises-does-not-catch-stopiteration-error
    """
    with pytest.raises(RuntimeError) as exc_info:
        next(seq_groups([]))
    assert "StopIteration" in str(exc_info.value)

    https://stackoverflow.com/questions/66566960/pytest-raises-does-not-catch-stopiteration-error
    
tests/test_utils.py