def test_set_type(self): annotation = arguments.TypedArgument() assert annotation.type is None annotation.type = "type" assert annotation.type == "type"
def test_set_type_with_type_already_set(self): annotation = arguments.TypedArgument("type") with pytest.raises(AttributeError): annotation.type = "new type"
def test_type(self): assert arguments.TypedArgument("hello").type == "hello"