Skip to content

TST: stricter monotonicity/uniqueness tests (part 2) #23294

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

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

topper-123
Copy link
Contributor

Continuation of #23256.

By making the uniqueness tests stricter (i.e. testing for actual True/False rather than truthy/Falsy values) I think we get better ensurance that some PR doesn't accidentally turn a property into a method or that the property doesn't accidentally returns a non-boolean return value.

@pep8speaks
Copy link

Hello @topper-123! Thanks for submitting the PR.

@TomAugspurger
Copy link
Contributor

Looks like some related test failures though.

@topper-123 topper-123 force-pushed the stricter_is_unique_tests branch 2 times, most recently from f821f86 to 8a86d7d Compare October 23, 2018 11:59
@topper-123 topper-123 force-pushed the stricter_is_unique_tests branch from 8a86d7d to 92bbf56 Compare October 23, 2018 13:07
@codecov
Copy link

codecov bot commented Oct 23, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23294   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files         169      169           
  Lines       50897    50897           
=======================================
  Hits        46940    46940           
  Misses       3957     3957
Flag Coverage Δ
#multiple 90.65% <ø> (ø) ⬆️
#single 42.29% <ø> (ø) ⬆️

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 5a0c91e...92bbf56. Read the comment docs.

@topper-123
Copy link
Contributor Author

The failure issue was that Index.hasnans sometimes returns a python boolen and sometimes a numpy boolean.

As this PR mainly concerns itself with is_monotonoc* and is_unique, I've simply removed the few changes to hasnans tests from this PR. I will later submit a seperate PR regarding hasnans, so as to keep things clean.

@jreback jreback added the Testing pandas testing functions or related to the test suite label Oct 24, 2018
@jreback jreback added this to the 0.24.0 milestone Oct 24, 2018
@jreback jreback merged commit 92fd46c into pandas-dev:master Oct 24, 2018
@jreback
Copy link
Contributor

jreback commented Oct 24, 2018

thanks!

@topper-123 topper-123 deleted the stricter_is_unique_tests branch October 27, 2018 08:15
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants