def METHOD_NAME(self, course_dir, temp_cwd):
    """Test that an error is thrown when the assignment name is invalid."""
    self._empty_notebook(join(course_dir, 'source', 'foo+bar', 'foo.ipynb'))
    with pytest.raises(traitlets.TraitError):
        run_nbgrader(["generate_solution", "foo+bar"])
    assert not os.path.isfile(join(course_dir, "solution", "foo+bar", "foo.ipynb"))