illegal optimizer does nothing
When providing an illegal optimization method, it'll all go through without complaining or optimizing. :) There should probably be an error message listing the possible choices.
MWE:
import gmsh
gmsh.initialize()
gmsh.merge(tmp_filename)
gmsh.model.mesh.optimize("illegal")
gmsh.finalize()