cleder / czml

Read and write CZML in Python
90 stars 27 forks source link

Material Subclasses #8

Closed Frencil closed 9 years ago

Frencil commented 9 years ago

Material Subclasses

This branch adds support for all six documented material subclasses:

As documented in CZML Content. Included are some minor fixes to existing subclasses and tests.

Question: best approach for full test coverage

While I added test functions for each new class I did not add coverage of material subclasses in the (admittedly long) testCZMLPacket function. What is the intended long-term purpose of testCZMLPacket? Should it seek to implement every possible CZML element? If the test functions in this pull request are not sufficient on there own is there a better way to test their implementation without expanding testCZMLPacket into a thousand-line function over time?

cleder commented 9 years ago

as for testCZMLPacket I think that should be replaced with reading json from the file system and then testing if the non serialized output == deserialized input. The approach was just the easiest and fastest to implement when the package was still small. Feel free to replace it with what you see fit for the purpose and what you are comfortable with.

cleder commented 9 years ago

I have no sentimental attachment to testZMLPacket ;-)

Frencil commented 9 years ago

I think that should be replaced with reading json from the file system and then testing if the non serialized output == deserialized input.

That sounds like a good approach, thanks. I'll see what I can do!