Skip to content

TST: avoid usage of unnecessary xfail in test_datetime64 #55860

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
Nov 7, 2023

Conversation

jorisvandenbossche
Copy link
Member

I noticed those xfails when running the tests in this file locally, because those are for some reason very slow.

First, what we mark as "xfail" is not actually an expected test failure like not-yet-implemented or not-yet-fixed-bug (i.e. something that could be fixed at some point). It's simply that DataFrame broadcasting works differently, so if we want to test this, we should be asserting that it raises a ValueError, which is the expected behaviour.
But for this test, we can actually use a fixture that excludes DataFrame and keep the test working the same for the rest.

And for some reason, this speeds up running the tests in this file a lot (for me locally, this goes from about 105s to 5s, saving almost two minutes). I don't understand why, though ;)

@jorisvandenbossche jorisvandenbossche added the Testing pandas testing functions or related to the test suite label Nov 7, 2023
@jbrockmendel jbrockmendel merged commit 64d515a into pandas-dev:main Nov 7, 2023
@jbrockmendel
Copy link
Member

Thanks @jorisvandenbossche

@mroeschke mroeschke added this to the 2.2 milestone Nov 7, 2023
@jorisvandenbossche jorisvandenbossche deleted the tst-remove-xfail branch November 7, 2023 16:25
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.

3 participants