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

Fix missing config errors when running test suite #1365

Merged
merged 3 commits into from
Apr 12, 2017

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Apr 10, 2017

Fixes #1358, #1353

The approach I took here is to not package conftest.py with the xarray distribution, but rather make the test suite robust to it's absence.

Also, as suggested by @QuLogic in #1336, switched from using a custom decorator for --run-slow to just using @pytest.mark.slow.

Finally, I speed-up the test_dataset.test_rolling_reduce tests (from ~55 to ~17 seconds when bottleneck is not installed) and marked them as slow. It would be nice to get them running in a few seconds or less, but we can save that for later. On my laptop, the whole test suite now runs with -k 'not slow' in 36 seconds, which is not great, but acceptable.

CC @pwolfram @jhamman @ghisvail

  • tests added / passed
  • passes git diff upstream/master | flake8 --diff
  • whatsnew entry

shoyer added 2 commits April 9, 2017 19:21
Fixes GH1358, GH1353

The approach I took here is to *not* package `conftest.py` with the xarray
distribution, but rather make the test suite robust to it's absence.

Also, as suggested by QuLogic in GH1336, switched from using a custom decorator
for `--run-slow` to just using `@pytest.mark.slow`.

Finally, I speed-up the test_dataset.test_rolling_reduce tests (from ~55 to ~17
seconds when bottleneck is not installed) and marked them as slow. It would be
nice to get them running in a few seconds or less, but we can save that for
later. On my laptop, the whole test suite now runs with `-k 'not slow'` in
36 seconds, which is not great, but acceptable.

CC pwolfram jhamman ghisvail
Copy link
Contributor

@pwolfram pwolfram left a comment

Choose a reason for hiding this comment

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

Looks good to me!

# Can't get config from pytest, e.g., because xarray is installed instead
# of being run from a development version (and hence conftests.py is not
# available). Don't run flaky tests.
_SKIP_FLAKY = True
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice solution!

@shoyer shoyer merged commit 1f30b29 into pydata:master Apr 12, 2017
@shoyer shoyer deleted the conftest-fixups branch April 12, 2017 22:29
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.

2 participants