pombreda / formalchemy

Automatically exported from code.google.com/p/formalchemy
MIT License
0 stars 0 forks source link

Composite types don't actually work right #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Support for composite types was added quite a while ago; unfortunately, the
test case isn't quite right, so even though the tests pass, the code
doesn't work.

In short, regarding the tests: for a composite type Point, which is used in
a class called Vertex, the renderer should be called PointFieldRenderer,
not VertexFieldRenderer, and should be added to FieldSet.default_renderers
as FieldSet.default_renderers[Point] = PointFieldRenderer (otherwise, you
could only have one composite renderer per class--what if there's another
composite field type being used besides Point?).

The attached patch corrects the tests as well as Field.type in fields.py.

Original issue reported on code.google.com by kurtraschke@gmail.com on 27 Apr 2009 at 12:57

Attachments:

GoogleCodeExporter commented 9 years ago
committed.  Thanks!

Original comment by jbel...@gmail.com on 27 Apr 2009 at 2:35