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
932cf47e
Commit
932cf47e
authored
Apr 23, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
358cd09c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+8
-10
No files found.
wcfs/wcfs_test.py
View file @
932cf47e
...
...
@@ -177,8 +177,8 @@ class tDB:
transaction
.
commit
()
head
=
last
.
_p_serial
t
.
ncommit
+=
1
print
(
'commit -> @%s
\
t
# @at%d'
%
(
h
(
head
),
t
.
ncommit
))
t
.
ncommit
+=
1
t
.
head
=
head
t
.
_headv
.
append
(
head
)
return
head
...
...
@@ -528,9 +528,10 @@ def test_wcfs():
t
.
root
[
'!file'
]
=
nonfile
=
Persistent
()
t
.
root
[
'zfile'
]
=
zf
=
ZBigFile
(
blksize
)
tid1
=
t
.
commit
()
tid2
=
t
.
commit
()
assert
tidtime
(
tid2
)
>
tidtime
(
tid1
)
at0
=
t
.
commit
()
t
.
ncommit
=
0
# so that atX in the code correspond with debug output
at0_
=
t
.
commit
()
assert
tidtime
(
at0_
)
>
tidtime
(
at0
)
t
.
wcsync
()
# >>> lookup non-BigFile -> must be rejected
...
...
@@ -538,13 +539,10 @@ def test_wcfs():
t
.
stat
(
nonfile
)
assert
exc
.
value
.
errno
==
EINVAL
# reset ncommit so that atX in the code correspond with debug output
t
.
ncommit
=
0
# >>> file initially empty
f
=
t
.
open
(
zf
)
f
.
assertCache
([])
f
.
assertData
([],
mtime
=
tid1
)
f
.
assertData
([],
mtime
=
at0
)
# >>> (@at1) commit data -> we can see it on wcfs
t
.
change
(
zf
,
{
2
:
b'alpha'
})
...
...
@@ -620,8 +618,8 @@ def test_wcfs():
@
func
def
_
():
defer
(
done
.
close
)
pinv
=
w
.
expectPin
([(
zf
,
2
,
at1
),
(
zf
,
3
,
at
2
)])
#pinv = w.expectPin({zf: [(2, at1), (3, at
2
)]}) XXX <- this way better? (sugar)
pinv
=
w
.
expectPin
([(
zf
,
2
,
at1
),
(
zf
,
3
,
at
0
)])
#pinv = w.expectPin({zf: [(2, at1), (3, at
0
)]}) XXX <- this way better? (sugar)
for
p
in
pinv
:
p
.
ack
()
go
(
_
)
...
...
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