-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
MAINT: Remove self.assertEqual from testing #16169
Conversation
7b5fd16
to
1c69060
Compare
Codecov Report
@@ Coverage Diff @@
## master #16169 +/- ##
==========================================
- Coverage 90.86% 90.86% -0.01%
==========================================
Files 162 162
Lines 50819 50821 +2
==========================================
Hits 46177 46177
- Misses 4642 4644 +2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #16169 +/- ##
==========================================
+ Coverage 90.86% 90.88% +0.02%
==========================================
Files 162 162
Lines 50819 50821 +2
==========================================
+ Hits 46177 46190 +13
+ Misses 4642 4631 -11
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple of places where I actually want to assert that i am getting a boolean back
use assert is False
assert is_scalar(result) | ||
|
||
x = False | ||
result = pd.eval('x', engine=self.engine, parser=self.parser) | ||
self.assertEqual(result, False) | ||
assert not result | ||
assert is_scalar(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert result is False
if the test is actually expecting False and not just Falsey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
# Check non-masked values | ||
mat2 = ma.copy(mat) | ||
mat2[0, 0] = True | ||
mat2[1, 2] = False | ||
frame = DataFrame(mat2, columns=['A', 'B', 'C'], index=[1, 2]) | ||
self.assertEqual(True, frame['A'][1]) | ||
self.assertEqual(False, frame['C'][2]) | ||
assert frame['A'][1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is True and is False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
1c69060
to
bfc963c
Compare
Travis is failing for reasons that I don't understand....see here. |
do those work locally? you can just revert that module/file for now and debug / followup after . |
@jreback : Yes, they do. I walked through the code myself. Also, the |
@jreback : You know what I can do: I can check |
bfc963c
to
9fb41da
Compare
@jreback : Workaround succeeded. Everything is green. |
@@ -104,6 +104,7 @@ def signature(f): | |||
map = map | |||
zip = zip | |||
filter = filter | |||
intern = sys.intern |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fine
but where is it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stumbled upon it in a test (test_util.py
), so I added this to compat
for that reason.
thanks! |
Title is self-explanatory. Massive, massive PR.
Partially addresses #15990.