-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Strange behavior at testing test_ts_plot_with_tz #35080
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
Not intentional. Most likely there's some state leaking between tests, but I haven't confirmed that. Any investigation here would be welcome. |
Seems to be related to/duplicate of #32331 (Saw it just now when browsing the other 'unreliable tests' issues). |
more specifically it boils down to running both
|
if we add
we see that we get the data from a different plot ( xdata should be [Period('2011-01-01 00:00', 'H') Period('2011-01-01 01:00', 'H')] ):
in the case of the attribute error:
in the case of the assertion error:
|
I tried to wrap my head around it but can't find the root cause. The immediate failure cause is that the axes object still holds the previous line plot (as first Inside So a makeshift workaround is to add pandas/pandas/tests/plotting/test_datetimelike.py Lines 53 to 54 in 8d10bfb
This doen't however address the root cause. To properly resolve the issue the |
Another possibility is to add @mroeschke / @TomAugspurger If you feel that this is sufficient to address this issue I can prepare a PR. |
Cleaning up at the end of the test makes sense.
…On Thu, Jul 2, 2020 at 7:54 AM Steffen Rehberg ***@***.***> wrote:
Another possibility is to add plt.clf() at the end of
test_registering_no_warning, test_pandas_plots_register and
test_option_no_warning. This seems cleaner to me as it's close to the
origin of the problem, although I'm not completely convinced if this indeed
addresses the root cause of the issue.
@mroeschke <https://github.com/mroeschke> / @TomAugspurger
<https://github.com/TomAugspurger> If you feel that this is sufficient to
address this issue I can prepare a PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35080 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKAOIVV2PCC2E42SPVHIRLRZR7P3ANCNFSM4ONDCRLA>
.
|
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
I came across a rather strange and annoying behavior when running the plotting tests that leaves me completely clueless.
TestTSPlot.test_ts_plot_with_tz['UTC']
fails when running the whole test suite but passes when run in isolation. In particular it fails when run after allTestRegistration
tests and passes when run on its own or after any of the six test functions inTestRegistration
:FAILURE:
SUCCESS:
As I said it passes when run after any of the individual functions in
TestRegistration
, i.e. with-k "test_register_by_default | test_ts_plot_with_tz"
,"test_registering_no_warning | test_ts_plot_with_tz"
etc.Tests are run in an environment set up as described here. Pytest and plugin versions see above. Pandas fresh snapshot as of yesterday
1.1.0.dev0+1977.g1706d830d
.I'm pretty sure it's a question of my setup, so sorry for bothering you with it, but maybe someone has any idea or pointers of where to look for the reason of this behavior.
The text was updated successfully, but these errors were encountered: