def should_reject_overriding_a_set_contextual_name(float_field: Float): # given float_field._set_contextual_name("contextual_name") # when, then with pytest.raises(FieldNameError): float_field._set_contextual_name("another_name")
def should_get_contextual_field_name(float_field: Float): # given float_field._set_contextual_name("contextual_name") # when contextual_name = float_field._contextual_name # then assert contextual_name == "contextual_name"