def test_raise_empty_dir_name(output_dir, undefined_context):
    """Verify correct error raised when directory name is empty."""
    with pytest.raises(exceptions.EmptyDirNameException):
        generate.render_and_create_dir(
            dirname='',
            output_dir=output_dir,
            context=undefined_context,
            environment=Environment(autoescape=True),
        )
    assert not Path(output_dir).joinpath('testproject').exists()
Verify correct error raised when directory name is empty.
tests/test_generate_files.py