Skip to content

TST: add messages to bare pytest raises in pandas/tests/io/pytables/test_timezones.py #37975

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

Conversation

marktgraham
Copy link
Contributor

@marktgraham marktgraham commented Nov 20, 2020

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

This PR adds messages to the bare pytest raises in pandas/tests/io/pytables/test_timezones.py. This PR references #30999.

@marktgraham marktgraham changed the title add messages to bare pytest raises in pandas/tests/io/pytables/test_timezones.py TST: add messages to bare pytest raises in pandas/tests/io/pytables/test_timezones.py Nov 20, 2020
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.

Nice, thanks! looks good to me pending green


feel free to take on more than one file in the same PR if the changes aren't too big

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.

It looks like, during one of the CI jobs, the error shows 'existing_value [dateutil/US/Eastern] conflicts with new value [dateutil/EET]', without /usr/share/zoneinfo

so you may need a regular expression here, e.g. something like

        msg = (
            r"invalid info for \[values_block_1\] for \[tz\], "
            r"existing_value \[dateutil/.*US/Eastern\] "
            r"conflicts with new value \[dateutil/.*EET\]"
        )

@marktgraham
Copy link
Contributor Author

Nice, thanks! looks good to me pending green

Thanks!

feel free to take on more than one file in the same PR if the changes aren't too big

Will do, I think that will work for a couple of the other files.

@marktgraham
Copy link
Contributor Author

@MarcoGorelli thanks for your suggestion, I made the change and now all the checks pass.

@jreback jreback added Testing pandas testing functions or related to the test suite Error Reporting Incorrect or improved errors from pandas labels Nov 20, 2020
@jreback jreback added this to the 1.2 milestone Nov 20, 2020
@jreback jreback merged commit 08e4baf into pandas-dev:master Nov 20, 2020
@jreback
Copy link
Contributor

jreback commented Nov 20, 2020

thanks @marktgraham

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas 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