zodbdump: Add golden test
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.
Showing
zodbtools/test/__init__.py
0 → 100644
zodbtools/test/test_dump.py
0 → 100644
zodbtools/test/testdata/1.fs
0 → 100644
File added
File added
File added
Please register or sign in to comment