Skip to content

Commit

Permalink
Change error messages for Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Jeffery authored and mergify[bot] committed Oct 6, 2022
1 parent a709954 commit 7f77e9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/tests/test_highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2725,9 +2725,9 @@ def test_array_attr_properties(self, ts_fixture, array):
ts = ts_fixture
a = getattr(ts, array)
assert isinstance(a, np.ndarray)
with pytest.raises(AttributeError, match="set attribute"):
with pytest.raises(AttributeError):
setattr(ts, array, None)
with pytest.raises(AttributeError, match="delete attribute"):
with pytest.raises(AttributeError):
delattr(ts, array)
with pytest.raises(ValueError, match="read-only"):
a[:] = 1
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ def test_set_metadata_schema(self):
table.metadata_schema = self.metadata_schema
assert repr(table.metadata_schema) == repr(self.metadata_schema)
# Del should fail
with pytest.raises(AttributeError, match="can't delete attribute"):
with pytest.raises(AttributeError):
del table.metadata_schema
# None should fail
with pytest.raises(
Expand Down

0 comments on commit 7f77e9d

Please sign in to comment.