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
Check that list_samplers returns a list (fix #397) #398
Check that list_samplers returns a list (fix #397) #398
Conversation
Hmmm, I expected the first commit - 16cb167 - to fail the python3 tests. |
No idea why the first commit passed - looking at https://travis-ci.org/sherpa/sherpa/jobs/273877659#L836 we can see that it has run the new test (
so I don't see how the test could have passed. |
This is a copy of the sherpa.sim test, but it is lsightly different in that the set of available samplers has been increased. Perhaps the test for the samplers should be seprated from the test that list_samplers returns a list?
There should be no functional change here
The contents of the list_samplers return value is now separated out into a separate test. As this routine is also available from the ui layer new tests are added for it (essentially copies of the same test). I have created new test files for the "ui" versions of the tests: these may be better in the session tests (but see discussion of session tests in sherpa#396) or the exsiting "unit" test for the ui code (e.g. test_astro_ui_utils_unit.py)
About to rebase. Original tip was b152b40 |
b152b40
to
3177f0d
Compare
I have no idea why the travis builds succeeded for the first commit (the equivalent of 71ee06b before the rebase). I'm removing the pr:hold label. |
@olaurino can we have this labelled for CIAO 4.10? |
I must have done something stupid while I was trying to debug the Travis build, because my initial guess on why Travis was green turned out to be correct but only after I thought I had proved it was not. Anyhow. Unless you have Travis activated on your fork (which would be a good idea) the only check performed by Travis is the PR build, i.e. how well the PR plays when merged into the master branch. Past experience tells us that this is less safe than the push builds, because the push builds are executed on the individual commits, while for the PR builds Travis uses a special GitHub reference for a fake merge commit of the PR (e.g. https://travis-ci.org/sherpa/sherpa/jobs/273877659#L488), not the commit ID. That means that if you push multiple commits in rapid succession Travis might run multiple builds on the same commit (well, I think Travis now cancels builds if they are overridden by other commits in the same branch, so that's also different, and it might be what tripped me this time). So, my educated guess is that all the Travis builds were run on merge commits that already had the fix in them. I can't fully test that the above is actually what happened here, but what I could do was to push the first commit in this PR to my fork and check that it failed in Travis. It did, exactly as expected. |
Release notes
The
list_samplers
function now returns a list in Python 3 as well.Notes
This is part of #397.