tiled
tiled copied to clipboard
Add smoke testing utilities for integration-testing a Tiled deployment
The function tiled.client.tree walks Tiled's data structure and touches every node. It would be useful to further have utilities that:
- read the data, in whole or in part
- export the data in each of the range of nominally supported formats
- more?
Perhaps something like:
smoke_read(node)
smoke_export(node)
smoke_all(node) # read and export and anything else we can think of
Perhaps this could start in a new module, tiled.client.smoke.
Let's do smoke_read first. Recursively walk containers, and call .read() on anything that is not a container.
When we get to smoke_export, we can again recursively walk containers, call .export() on everything (including the containers themselves) looping over the list of supported .formats supported by each node. The export methods support writing into an in-memory buffer, which might be the way to go here.