Skip to content

Pytest Deprecation in test_pytables #24706

Closed
@TomAugspurger

Description

@TomAugspurger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Testingpandas testing functions or related to the test suitegood first issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions