-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST/CLN: Remove more seldom used fixtures #56625
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
Conversation
This reverts commit e4f81bb.
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.
seems pretty reasonable to me. out of curiosity how are you identifying these?
|
||
|
||
@pytest.fixture | ||
def filepath_or_buffer(filepath_or_buffer_id, tmp_path): |
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 am surprised this is only used in one place - do we not have something similar elsewhere already?
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.
Fixture-wise I don't think so. But I think I've seen similar testing over string-path, file-obj-path, buffer in other tests. I can try to track those down and fixture-ize in a followup
@@ -2668,7 +2422,243 @@ def test_allow_exact_matches_and_tolerance( | |||
tolerance=Timedelta("100ms"), | |||
allow_exact_matches=False, | |||
) | |||
expected = allow_exact_matches_and_tolerance | |||
df = pd.DataFrame( |
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.
Totally separate from this PR but would be nice to have test data that does not span 200 lines of code
@@ -238,20 +229,23 @@ def test_sub(date, offset_box, offset2): | |||
|
|||
|
|||
@pytest.mark.parametrize( | |||
"offset_box, offset1", | |||
"offset_box, offset1, dt", |
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.
Maybe dt
should just be a separate parameter set?
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 was under the impression that each parameter set needed a particular dt to make the assertions hold below.
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.
Don't want to get hung up on it and maybe misreading, but doesn't the original test always use 01-02-2008 as the dt value? Where did 2014-07-01 come from?
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.
Oh! My mistake. Previous I thought this used the dt
fixture defined above in this file but it looks like it didn't. Looks like I can simplify this parameterization all together.
I modified |
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.
lgtm when green. thanks for doing this @mroeschke - I think helps with the test suite readability and maintenance a lot
No description provided.