Test code generator module
Test code generator module

The various nested data structures with all their hashes are a
real pain to organize and calculate by hand.  But for a proper test,
you want the structures to be declaratively defined, as well as the
appropriate hash tokenization thereof.

So the merky.test.generate_samples module will spit out the code
for a module (on stdout) containing the definition for a variety
of constants to be used in tests.

A given constant prefix will have structures with the following
suffixes:

- '_NATURAL': the structure is "native" form of dicts and tuples.
- '_ORDERED': the structure is its normal, "ordered" form used for
  tokenization (OrderedDict and list)
- '_TOKENS': object graph with same indexing shape as the natural
  and ordered representations, but with each node having a "token"
  (sha1 hash) attribute and a "member" attribute (the tokenized
  data structure).

ethanrowe/python-merky