• Kirill Smelkov's avatar
    test/*: Start testing zodbtools behaviour on ZODB databases of multiple kinds · bf772ce0
    Kirill Smelkov authored
    Since 0b6f99da (test/gen_testdata: Fix for ZODB5 > 5.5.1 + preserve
    database compatibility with ZODB3/py2) we are generating our test
    database with using pickle protocol=2. This was done in order to make
    sure the zodbtools works ok with data generated by e.g. ZODB4. However
    we still have lots of databases that are generated with pickle
    protocol=1, and we also have newer databases that are generated with
    pickle protocol=3. Note that it is not only data records who are
    affected by specified pickle protocol. For example for FileStorage the
    index is also saved via pickling and so used pickle protocol affects
    index format. For example ZODB/go currently cannot load FileStorage
    index if it was saved via protocol=3.
    
    Since zodbtools should work ok with any data it creates a need to test
    it against all kinds of ZODB databases: generated by either py2 or py3,
    and saved via pickle protocol 1,2 and 3.
    
    In this patch we add infrastructure for such testing and extend testdata
    coverage to cover not only py2_pickle2, but also py2_pickle1. We will
    add support for py2_pickle3 and py3_pickle3 in the follow-up patches.
    
    Testdata files are now located inside dedicated subdirectories - one for
    one ZODB kind. py2_pickle2/* is exactly the same compared to testdata
    files we had before. py2_pickle1/* is bit different. It is handy to see
    the difference via e.g.
    
        $ diff -u py2_pickle2/zdump.zpickledis.ok py2_pickle1/zdump.zpickledis.ok
    
    In tests particular kind of testdata is now accessed via ztestdata
    fixture. Please see changes in zodbtools/test/conftest.py and
    zodbtools/test/gen_testdata.py for details.
    bf772ce0