diff --git a/pandas/tests/io/test_pytables.py b/pandas/tests/io/test_pytables.py index a6a38e005b9b6..4ba181384b3b3 100644 --- a/pandas/tests/io/test_pytables.py +++ b/pandas/tests/io/test_pytables.py @@ -4877,15 +4877,17 @@ def test_to_hdf_with_object_column_names(self): if compat.PY3: types_should_run.append(tm.makeUnicodeIndex) else: - types_should_fail.append(tm.makeUnicodeIndex) + # TODO: Add back to types_should_fail + # https://github.com/pandas-dev/pandas/issues/20907 + pass for index in types_should_fail: df = DataFrame(np.random.randn(10, 2), columns=index(2)) with ensure_clean_path(self.path) as path: with catch_warnings(record=True): - with pytest.raises( - ValueError, msg=("cannot have non-object label " - "DataIndexableCol")): + with tm.assert_raises_regex( + ValueError, ("cannot have non-object label " + "DataIndexableCol")): df.to_hdf(path, 'df', format='table', data_columns=True)