Skip to content
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

BUG: for several datasets, download_if_missing keyword was ignored. #7944

Merged
merged 1 commit into from Nov 29, 2016

Conversation

rgommers
Copy link
Contributor

Do what is promised in the docstring (raise an IOError), if download_if_missing=False and the dataset wasn't previously downloaded.

@agramfort
Copy link
Member

LGTM but can you look why CIs are not happy?

@rgommers
Copy link
Contributor Author

LGTM but can you look why CIs are not happy?

A combination of me being asleep and running the tests for the wrong version of sklearn, and 2 tests being a bit odd with checking for a particular error code. Fixed now.

if e.errno == errno.ENOENT:
raise SkipTest("Covertype dataset can not be loaded.")
except IOError:
raise SkipTest("Covertype dataset can not be loaded.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agramfort I know it's an old code but why use a SkipTest rather than an assert_raise_message ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't know whether the call will succeed, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. Thanks for the clarification and sorry for the misunderstanding @amueller.

@tguillemot
Copy link
Contributor

LGTM despite the SkipTest :)

@amueller
Copy link
Member

regression test would be checking that we get an IOError if the file does not exist, right? Might be a bit overkill? Otherwise LGTM.

@TomDLT
Copy link
Member

TomDLT commented Nov 29, 2016

LGTM

@amueller amueller merged commit 63583fe into scikit-learn:master Nov 29, 2016
@amueller
Copy link
Member

uh that needs a whatsnew. Anyone wanna have a go?

@rgommers rgommers deleted the dowload-if-missing branch November 29, 2016 18:55
@rgommers
Copy link
Contributor Author

You mean a mention under "bug fixes" in doc/whats_new.rst? I can send a new PR for that.

@amueller
Copy link
Member

indeed. Thanks :)

sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants