-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: test_finalize.py tests failing on master with pytest-randomly #34373
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
Comments
This is on CI or just locally? Any tracebacks you can share? |
Just locally
|
It looks like i have (had) pytest-randomly installed on this machine. Removing it fixes these failures. So it looks like there's some global state somewhere |
@TomAugspurger i thought i pinged on this last week but can't find it. I think there may be a simple solution here, need you to confirm if it is correct. Am I right in thinking the following should always hold:
|
It seems a bit strange to make an assertion about the inputs to the test, no? But I guess the issue is that they're being unexpectedly mutated somehow? |
exactly. the same Series/DataFrame objects are being re-used across the parametrized tests, so when the attrs are set in the lines below, this assumption is invalidated in the following tests. so if its correct that these assertions should hold, then we can just clear the attrs at the beginning of each test and be fine |
related, i think a possible typo?
|
@TomAugspurger gentle ping. if im right about the expected behavior, ive got a branch ready to push |
Ah I see, you're using the asserts to show the expected behavior. The diff would be to set the attrs (and maybe make a copy too?). If so, yes I agree, and that does seem like a typo on the second |
Well I take back the part about the branch being ready... a few weeks ago I thought I had this working, but now clearing out the attrs at the start of the test breaks 42 tests (regardless of whether I change the "left" -> "right") |
This test might try to assert |
On Ubuntu18 im seeing a variable number of tests in test_binops failing with empty
.attrs
cc @TomAugspurger
The text was updated successfully, but these errors were encountered: