Skipping tests for different versions of Scipy for optimize.py

I am using the skipping test mechanism to make the tests on optimize to be a bit more readable. 
Nothing much in this PR. Mostly a change in style.
Why?