Welcome to jaraco.test documentation!

jaraco.test.property_error(name)

Generate a regular expression for capturing the expected error messages that can result from attempting to set on a property without a setter.

>>> class Foo:
...     @property
...     def bar(self):
...         return 'bar'
>>> import pytest
>>> with pytest.raises(AttributeError, match=property_error('Foo.bar')):
...     Foo().bar = 'anything'

Indices and tables