Skip to content

TST: add a test on mixed offsets for read_csv #54245

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

natmokval
Copy link
Contributor

xref #54014

added a test on mixed offsets to increase coverage for read_csv

@natmokval natmokval marked this pull request as ready for review July 24, 2023 20:34
@mroeschke mroeschke requested a review from MarcoGorelli July 24, 2023 20:44
@MarcoGorelli
Copy link
Member

test looks good, but I think pandas/tests/io/parser/test_parse_dates.py might be a better location

@natmokval
Copy link
Contributor Author

test looks good, but I think pandas/tests/io/parser/test_parse_dates.py might be a better location

Thanks, I moved the test as you suggested.

@@ -2237,3 +2237,17 @@ def test_parse_dates_arrow_engine(all_parsers):
}
)
tm.assert_frame_equal(result, expected)


def test_from_csv_with_mixed_offsets():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work to use the

parser = all_parsers

and then

parser.read_csv

pattern from the other tests in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works very well, except pyarrow. I added @xfail_pyarrow.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me on green

@natmokval
Copy link
Contributor Author

Thank you for reviewing this PR.

@MarcoGorelli MarcoGorelli added this to the 2.1 milestone Jul 25, 2023
@MarcoGorelli MarcoGorelli added the Needs Tests Unit test(s) needed to prevent regressions label Jul 25, 2023
@MarcoGorelli MarcoGorelli merged commit e4b085c into pandas-dev:main Jul 25, 2023
jamie-harness pushed a commit to jamie-harness/pandas1 that referenced this pull request Jul 26, 2023
* TST: add a test on mixed offsets for read_csv

* change the location of the test

* add parser to the test
jamie-harness added a commit to jamie-harness/pandas1 that referenced this pull request Jul 26, 2023
* TST: add a test on mixed offsets for read_csv

* change the location of the test

* add parser to the test

Co-authored-by: Natalia Mokeeva <[email protected]>
jamie-harness pushed a commit to jamie-harness/pandas1 that referenced this pull request Jul 26, 2023
* TST: add a test on mixed offsets for read_csv

* change the location of the test

* add parser to the test
jamie-harness added a commit to jamie-harness/pandas1 that referenced this pull request Jul 26, 2023
* TST: add a test on mixed offsets for read_csv

* change the location of the test

* add parser to the test

Co-authored-by: Natalia Mokeeva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Tests Unit test(s) needed to prevent regressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants