tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Add smoke testing utilities for integration-testing a Tiled deployment

Open danielballan opened this issue 2 years ago • 2 comments

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

danielballan avatar Nov 15 '23 15:11 danielballan

Perhaps this could start in a new module, tiled.client.smoke.

danielballan avatar Jan 04 '24 16:01 danielballan

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.

danielballan avatar Jan 04 '24 16:01 danielballan