def test_is_public_trick(self): """Test that common prefix does not necessarily indicate private.""" method = self.makeMethod("foo") method.decorators = [ parser.Decorator('foobar', []), parser.Decorator('foobar.baz', []), ] assert method.is_public
def test_is_public_setter(self): """Test that setter methods are considered private.""" method = self.makeMethod('methodName') method.decorators = [ parser.Decorator('some_decorator', []), parser.Decorator('methodName.setter', []), ] assert not method.is_public
def test_is_public_deleter(self): """Test that deleter methods are also considered private.""" method = self.makeMethod('methodName') method.decorators = [ parser.Decorator('methodName.deleter', []), parser.Decorator('another_decorator', []), ] assert not method.is_public
def test_is_public_normal(self): """Test that methods are normally public, even if decorated.""" method = self.makeMethod('methodName') method.decorators = [parser.Decorator('some_decorator', [])] assert method.is_public