#NEWLINE# def property_mock( request , cls , prop_name , **kwargs ) : #NEWLINE# #INDENT# '\n    Return a mock for property *prop_name* on class *cls* where the patch is\n    reversed after pytest uses it.\n    ' #NEWLINE# _patch = patch . object ( cls , prop_name , new_callable = PropertyMock , ** kwargs ) #NEWLINE# request . addfinalizer ( _patch . stop ) #NEWLINE# return _patch . start ( )