def METHOD_NAME(self, generated_rows):
    yaml = """
    - object: foo
      just_once: True
    - object: bar
    """
    with pytest.raises(RuntimeError):
        generate(StringIO(yaml), stopping_criteria=StoppingCriteria("foo", 3))