Depends on your particular pump manufacturer and model.
Knowing that, you can search for the specs. They will tell you running amperage draw and starting current requirements. Starting current can be several times running current.
It may or may not work if you have a 1/2 hp 240v pump, but probably won’t work with a 3/4, 1, or larger hp pump.
Edit: it has to be a generator with 240 volt output to run any 240 volt motor, though.