Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
b242e07f
Commit
b242e07f
authored
Jul 26, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f0373eac
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
2 deletions
+65
-2
go/zodb/py/pyserialize-gen-testdata
go/zodb/py/pyserialize-gen-testdata
+34
-0
go/zodb/pyserialize_test.go
go/zodb/pyserialize_test.go
+29
-0
go/zodb/storage/fs1/fs1tools/dump.go
go/zodb/storage/fs1/fs1tools/dump.go
+1
-1
go/zodb/storage/fs1/py/gen-testdata
go/zodb/storage/fs1/py/gen-testdata
+1
-1
go/zodb/storage/fs1/ztestdata_expect_test.go
go/zodb/storage/fs1/ztestdata_expect_test.go
+0
-0
No files found.
go/zodb/py/pyserialize-gen-testdata
0 → 100755
View file @
b242e07f
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
"""generate reference pickle objects encoding for tests"""
from
ZODB.tests.testSerialize
import
SerializerTestCase
as
t
def
main
():
# dump to go what to expect
with
open
(
"ztestdata_pyserialize.go"
,
"w"
)
as
f
:
def
emit
(
v
):
print
>>
f
,
v
emit
(
"// Code generated by %s; DO NOT EDIT."
%
__file__
)
emit
(
"%r"
%
ft
.
old_style_without_newargs
)
if
__name__
==
'__main__'
:
main
()
go/zodb/pyserialize_test.go
0 → 100644
View file @
b242e07f
// Copyright (C) 2016-2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// You can also Link and Combine this program with other software covered by
// the terms of any of the Free Software licenses or any of the Open Source
// Initiative approved licenses and Convey the resulting work. Corresponding
// source of such a combination shall include the source code for all other
// software used.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
package
zodb
//go:generate ./py/pyserialize-gen-testdata
import
(
"testing"
)
func
TestPyClassString
(
t
*
testing
.
T
)
{
}
go/zodb/storage/fs1/fs1tools/dump.go
View file @
b242e07f
...
...
@@ -377,7 +377,7 @@ func (d *DumperFsTail) DumpTxn(buf *xfmt.Buffer, it *fs1.Iter) error {
// https://github.com/zopefoundation/ZODB/blob/5.2.0-5-g6047e2fae/src/ZODB/scripts/fstail.py#L39
buf
.
S
(
"
\n
user="
)
.
Qpyb
(
txnh
.
User
)
.
S
(
" description="
)
.
Qpyb
(
txnh
.
Description
)
//
NOTE in zodb/py .length is len - 8, in zodb/go - whole txn record length
//
XXX in zodb/py .length is len - 8, in zodb/go - whole txn record length -> FIXME better .Len be what is on disk
buf
.
S
(
" length="
)
.
D64
(
txnh
.
Len
-
8
)
buf
.
S
(
" offset="
)
.
D64
(
txnh
.
Pos
)
.
S
(
" (+"
)
.
D64
(
txnh
.
HeaderLen
())
.
S
(
")
\n\n
"
)
...
...
go/zodb/storage/fs1/py/gen-testdata
View file @
b242e07f
...
...
@@ -194,7 +194,7 @@ def main():
# dump to go what to expect
with
open
(
"testdata_expect_test.go"
,
"w"
)
as
f
:
with
open
(
"
z
testdata_expect_test.go"
,
"w"
)
as
f
:
def
emit
(
v
):
print
>>
f
,
v
emit
(
"// Code generated by py/gen-testdata; DO NOT EDIT."
)
...
...
go/zodb/storage/fs1/testdata_expect_test.go
→
go/zodb/storage/fs1/
z
testdata_expect_test.go
View file @
b242e07f
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment