New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping tests for different versions of Scipy for optimize.py #482

Merged
merged 4 commits into from Nov 27, 2014

Conversation

Projects
None yet
2 participants
@Garyfallidis
Member

Garyfallidis commented Nov 25, 2014

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.

opt = Optimizer(fun=func, x0=np.array([1., 1., 1.]), method='Powell')
print('Scipy >= 0.12')

This comment has been minimized.

@stefanv

stefanv Nov 25, 2014

Contributor

Leftover debug print?

if SCIPY_LESS_0_12:
del opt

This comment has been minimized.

@stefanv

stefanv Nov 25, 2014

Contributor

Why?

assert_array_almost_equal(opt.xopt, np.array([0, 0, 0]))
assert_almost_equal(opt.fopt, 0)
print('Scipy < 0.12')

This comment has been minimized.

@stefanv

stefanv Nov 25, 2014

Contributor

Another one

This comment has been minimized.

@stefanv

stefanv Nov 25, 2014

Contributor

I see what you're trying to do now--but perhaps this info should be printed out in the beginning of the test suite run instead to know the full configuration?

@stefanv

This comment has been minimized.

Contributor

stefanv commented Nov 25, 2014

Looks OK to me, apart from all the print statements in the tests which I'm not sure are useful.

@Garyfallidis

This comment has been minimized.

Member

Garyfallidis commented Nov 27, 2014

Hi @stefanv, I removed all the prints and the del. Should look better now.

stefanv added a commit that referenced this pull request Nov 27, 2014

Merge pull request #482 from Garyfallidis/fix_optimize_defaults_skip
TST: Skip tests for different versions of scipy for optimize.py

@stefanv stefanv merged commit f666cf4 into nipy:master Nov 27, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@stefanv

This comment has been minimized.

Contributor

stefanv commented Nov 27, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment