Commit e903a185 authored by Kirill Smelkov's avatar Kirill Smelkov

test/gen_testdata: Adjust it to match current testdata/ state

In 80559a94 ("zodbdump: support --pretty option with a format to show
pickles disassembly") we added support for zodbdump --pretty and
adjusted files in testdata/ to be named like 1.zdump.{raw,zpickledis}.ok
instead of just 1.zdump.ok. However, that renaming and
generation of 1.zdump.zpickledis.ok, it seems, were done by hand, because
rerunning gen_testdata.py still regenerates old 1.zdump.ok. It seems
that during nexedi/zodbtools!22 I
missed that gen_testdata.py was not updated.

-> Fix it.

Running gen_testdata.py with py2 and ZODB 5.8.1 regenerates *.fs and
*.ok files in testdata/ in exactly the same state they were.
parent 7ae5ff82
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2017-2021 Nexedi SA and Contributors.
# Copyright (C) 2017-2023 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -276,8 +276,9 @@ def main():
dbname += "_!zext"
gen_testdb("%s.fs" % dbname, zext=zext)
stor = FileStorage("%s.fs" % dbname, read_only=True)
with open("%s.zdump.ok" % dbname, "wb") as f:
zodbdump(stor, None, None, out=f)
for pretty in ('raw', 'zpickledis'):
with open("%s.zdump.%s.ok" % (dbname, pretty), "wb") as f:
zodbdump(stor, None, None, pretty=pretty, out=f)
if __name__ == '__main__':
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment