Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
56844643
Commit
56844643
authored
Mar 03, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
af23a7b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
wcfs/client/client_test.py
wcfs/client/client_test.py
+2
-3
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+1
-0
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+3
-5
No files found.
wcfs/client/client_test.py
View file @
56844643
...
...
@@ -27,7 +27,7 @@ wcfs.py/wcfs.go while running tox tests in wcfs mode.
from
__future__
import
print_function
,
absolute_import
from
golang
import
func
,
defer
from
golang
import
func
,
defer
,
b
from
wendelin.wcfs.wcfs_test
import
tDB
,
tAt
from
wendelin.wcfs
import
wcfs_test
...
...
@@ -56,8 +56,7 @@ class tMapping(object):
assert
t
.
mmap
.
blk_start
<=
blk
<
t
.
mmap
.
blk_stop
blk_inmmap
=
blk
-
t
.
mmap
.
blk_start
if
not
isinstance
(
dataok
,
bytes
):
dataok
=
dataok
.
encode
(
'utf-8'
)
dataok
=
b
(
dataok
)
fh
=
t
.
mmap
.
fileh
assert
len
(
dataok
)
<=
fh
.
blksize
dataok
+=
b'
\
0
'
*
(
fh
.
blksize
-
len
(
dataok
))
# trailing zeros
...
...
wcfs/client/wcfs.cpp
View file @
56844643
...
...
@@ -193,6 +193,7 @@ using std::vector;
// trace with op prefix taken from E.
#define etrace(format, ...) trace("%s", v(E(fmt::errorf(format, ##__VA_ARGS__))))
// wcfs::
namespace
wcfs
{
...
...
wcfs/wcfs_test.py
View file @
56844643
...
...
@@ -46,7 +46,7 @@ from time import gmtime
from
errno
import
EINVAL
,
ENOENT
,
ENOTCONN
from
stat
import
S_ISDIR
from
signal
import
SIGQUIT
,
SIGKILL
from
golang
import
go
,
chan
,
select
,
func
,
defer
,
default
,
error
from
golang
import
go
,
chan
,
select
,
func
,
defer
,
default
,
error
,
b
from
golang
import
context
,
errors
,
sync
,
time
from
zodbtools.util
import
ashex
as
h
,
fromhex
import
pytest
;
xfail
=
pytest
.
mark
.
xfail
...
...
@@ -342,8 +342,7 @@ class tDB(_tDB):
assert
isinstance
(
zf
,
ZBigFile
)
zfDelta
=
t
.
_changed
.
setdefault
(
zf
,
{})
for
blk
,
data
in
changeDelta
.
iteritems
():
if
not
isinstance
(
data
,
bytes
):
data
=
data
.
encode
(
'utf-8'
)
data
=
b
(
data
)
assert
len
(
data
)
<=
zf
.
blksize
zfDelta
[
blk
]
=
data
...
...
@@ -577,8 +576,7 @@ class tFile:
e
.
args
=
(
assertCtx
+
"
\
n
"
+
e
.
args
[
0
],)
defer
(
_
)
if
not
isinstance
(
dataok
,
bytes
):
dataok
=
dataok
.
encode
(
'utf-8'
)
dataok
=
b
(
dataok
)
blkdata
,
_
=
t
.
tdb
.
_blkDataAt
(
t
.
zf
,
blk
,
t
.
at
)
assert
blkdata
==
dataok
,
"computed vs explicit data"
t
.
_assertBlk
(
blk
,
dataok
,
pinokByWLink
)
...
...
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