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

Close ZipFile in compression test #22679

Merged
merged 4 commits into from
Sep 13, 2018

Conversation

TomAugspurger
Copy link
Contributor

@TomAugspurger TomAugspurger commented Sep 12, 2018

Maybe fixes #22675
Maybe fixed #22682

@TomAugspurger TomAugspurger added the Unreliable Test Unit tests that occasionally fail label Sep 12, 2018
@TomAugspurger TomAugspurger added this to the 0.24.0 milestone Sep 12, 2018
@pep8speaks
Copy link

Hello @TomAugspurger! Thanks for submitting the PR.

file_to_check.py:2442:-258: W605 invalid escape sequence '('
file_to_check.py:2442:-255: W605 invalid escape sequence ')'


@TomAugspurger
Copy link
Contributor Author

@Zac-HD any thoughts on this hypothesis failures?

__________________________ test_tick_equality[Milli] ___________________________

cls = <class 'pandas.tseries.offsets.Milli'>

    @pytest.mark.parametrize('cls', tick_classes)
>   @example(n=2, m=3)
    @given(n=st.integers(-999, 999), m=st.integers(-999, 999))
    def test_tick_equality(cls, n, m):
E   hypothesis.errors.FailedHealthCheck: Data generation is extremely slow: Only produced 6 valid examples in 1.20 seconds (0 invalid ones and 0 exceeded maximum size). Try decreasing size of the data you're generating (with e.g.max_size or max_leaves parameters).
E   See https://hypothesis.readthedocs.io/en/latest/healthchecks.html for more information about this. If you want to disable just this health check, add HealthCheck.too_slow to the suppress_health_check settings for this test.

We've set that value in pandas/conftest.py

hypothesis.settings.suppress_health_check = (hypothesis.HealthCheck.too_slow,)
, is that correct?

@Zac-HD
Copy link
Contributor

Zac-HD commented Sep 12, 2018

Ah, not quite - you need to assign to hypothesis.settings.default.suppress_health_check. At this point though I'd suggest

hypothesis.settings.register_profile(
    "ci", 
    suppress_health_check=(hypothesis.HealthCheck.too_slow,)
) 
hypothesis.settings.load_profile("ci")

might be less error-prone, and easier to add to in future!

@codecov
Copy link

codecov bot commented Sep 13, 2018

Codecov Report

Merging #22679 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22679   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         169      169           
  Lines       50715    50715           
=======================================
  Hits        46747    46747           
  Misses       3968     3968
Flag Coverage Δ
#multiple 90.58% <ø> (ø) ⬆️
#single 42.35% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/testing.py 85.96% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c040353...57f4a5a. Read the comment docs.

@@ -105,6 +105,7 @@ def get_exceldf(self, basename, ext, *args, **kwds):
class ReadingTestsBase(SharedItems):
# This is based on ExcelWriterBase

@td.skip_if_no('xlrd', '1.0.1') # GH-22682
Copy link
Member

Choose a reason for hiding this comment

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

Could we alternately just bump the minimum version of xlrd? 1.0.0 is over 2 years old at this point. Only 1.1.0 has been released since then but even that is over a year old now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought about it, though this seemed easier for now. I don't have a strong preference.

@Zac-HD
Copy link
Contributor

Zac-HD commented Sep 13, 2018

@TomAugspurger - FYI HypothesisWorks/hypothesis#1572 will ensure that settings issue can't come back.

@TomAugspurger
Copy link
Contributor Author

Merging this in an hour if there are no objections, as this is causing issues on master.

For now I'm ok with just skipping those tests @WillAyd, but I'm not at all against bumping our excel-related minimum versions and doing a bit of a cleanup (in a separate PR 😄).

@TomAugspurger TomAugspurger merged commit 0473aab into pandas-dev:master Sep 13, 2018
@TomAugspurger TomAugspurger deleted the ci-resource-fixup branch September 13, 2018 13:24
aeltanawy pushed a commit to aeltanawy/pandas that referenced this pull request Sep 20, 2018
* Updates HypothesisCheck setting
* Skips tests for old xlrd
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
* Updates HypothesisCheck setting
* Skips tests for old xlrd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unreliable Test Unit tests that occasionally fail
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: xlrd PendingDeprecationWarning BLD/IO: Elusive Travis ResourceWarning & closing files by default
4 participants