• Kirill Smelkov's avatar
    zodbdump: Add golden test · 7f0bbf7e
    Kirill Smelkov authored
    We add a program to generate a test database with all fancy features and
    then check `zodb dump` output on it to golden on.
    
    The test database itself is commited to git because we want to make sure
    zodbdump works ok for particular exact data and because transaction
    extension dict is potentially saved differently on various runs.
    
    Quoting
    
      https://docs.python.org/2.7/library/stdtypes.html#dict.items    and
      https://docs.python.org/3.7/library/stdtypes.html#dictionary-view-objects
    
    """ CPython implementation detail: Keys and values are listed in an arbitrary
        order which is non-random, varies across Python implementations, and depends
        on the dictionary’s history of insertions and deletions. """
    
    This way on test/gen_testdata.py changes it has to be run manually, and
    then the output result of the run committed back together with
    gen_testdata.py changes.
    7f0bbf7e
gen_testdata.py 7 KB