Skip to content

Pytest Deprecation in test_pytables #24706

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

Closed
TomAugspurger opened this issue Jan 10, 2019 · 3 comments · Fixed by #24707
Closed

Pytest Deprecation in test_pytables #24706

TomAugspurger opened this issue Jan 10, 2019 · 3 comments · Fixed by #24707
Labels
good first issue Testing pandas testing functions or related to the test suite

Comments

@TomAugspurger
Copy link
Contributor

with pytest.raises(KeyError,
message='No object named index in the file'):
store.select_column('df', 'index')

$ pytest pandas/tests/io/test_pytables.py::TestHDFStore::test_read_column
================================================================================ test session starts ================================================================================
platform darwin -- Python 3.7.2, pytest-4.1.0, py-1.6.0, pluggy-0.7.1
rootdir: /Users/taugspurger/sandbox/pandas, inifile: setup.cfg
plugins: xdist-1.23.2, repeat-0.7.0, forked-0.2, faulthandler-1.5.0, cov-2.6.0, hypothesis-3.59.1
collected 1 item

pandas/tests/io/test_pytables.py .                                                                                                                                            [100%]

================================================================================= warnings summary ==================================================================================
pandas/tests/io/test_pytables.py::TestHDFStore::test_read_column
  /Users/taugspurger/sandbox/pandas/pandas/tests/io/test_pytables.py:3926: PytestDeprecationWarning: The 'message' parameter is deprecated.
  (did you mean to use `match='some regex'` to check the exception message?)
  Please comment on https://github.com/pytest-dev/pytest/issues/3974 if you have concerns about removal of this parameter.
    message='No object named index in the file'):

-- Docs: https://docs.pytest.org/en/latest/warnings.html

message is deprecated. That should be match now.

@TomAugspurger TomAugspurger added good first issue Testing pandas testing functions or related to the test suite labels Jan 10, 2019
@TomAugspurger TomAugspurger added this to the Contributions Welcome milestone Jan 10, 2019
@rajibmitra rajibmitra mentioned this issue Jan 10, 2019
4 tasks
@TomAugspurger
Copy link
Contributor Author

Another one in pandas/tests/scalar/timestamp/test_unary_ops.py::TestTimestampUnaryOps::test_round_dst_border_nonexistent

@rajibmitra
Copy link
Contributor

I am on it.

@gfyoung
Copy link
Member

gfyoung commented Jan 11, 2019

That's a nice development to see. Without reading the docs, that name was a little confusing (i.e. does it refer to checking the message raised in the error OR the error message to display if the context manager fails?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants