def test_simple_deserialization(valid_data): """Ensure a deserialized RealDescriptor looks sane.""" descriptor = RealDescriptor.build(valid_data) assert descriptor.key == 'alpha' assert descriptor.units == '' assert descriptor.lower_bound == 5.0 assert descriptor.upper_bound == 10.0
def test_serialization(valid_data): """Ensure a serialized RealDescriptor looks sane.""" descriptor = RealDescriptor.build(valid_data) serialized = descriptor.dump() assert serialized == valid_data