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
a90f9ad4
Commit
a90f9ad4
authored
May 03, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f82ee6e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+9
-8
No files found.
wcfs/wcfs_test.py
View file @
a90f9ad4
...
@@ -159,9 +159,6 @@ class tDB:
...
@@ -159,9 +159,6 @@ class tDB:
t
.
_headv
=
[]
# XXX -> just use dFtail[·].rev ?
t
.
_headv
=
[]
# XXX -> just use dFtail[·].rev ?
t
.
dFtail
=
[]
# of DF
t
.
dFtail
=
[]
# of DF
# number of commits made so far
t
.
ncommit
=
0
# fh(.wcfs/zhead) + history of zhead read from there
# fh(.wcfs/zhead) + history of zhead read from there
t
.
_wc_zheadfh
=
open
(
t
.
wc
.
mountpoint
+
"/.wcfs/zhead"
)
t
.
_wc_zheadfh
=
open
(
t
.
wc
.
mountpoint
+
"/.wcfs/zhead"
)
t
.
_wc_zheadv
=
[]
t
.
_wc_zheadv
=
[]
...
@@ -224,10 +221,9 @@ class tDB:
...
@@ -224,10 +221,9 @@ class tDB:
transaction
.
commit
()
transaction
.
commit
()
head
=
last
.
_p_serial
head
=
last
.
_p_serial
print
(
'commit -> @%s
\
t
# @at%d'
%
(
h
(
head
),
t
.
ncommit
))
t
.
ncommit
+=
1
t
.
head
=
head
t
.
head
=
head
t
.
_headv
.
append
(
head
)
t
.
_headv
.
append
(
head
)
print
(
'commit -> %s'
%
t
.
hat
(
head
))
dF
.
rev
=
head
dF
.
rev
=
head
for
dfile
in
dF
.
byfile
.
values
():
for
dfile
in
dF
.
byfile
.
values
():
...
@@ -590,9 +586,6 @@ def test_wcfs():
...
@@ -590,9 +586,6 @@ def test_wcfs():
t
.
root
[
'zfile'
]
=
zf
=
ZBigFile
(
blksize
)
t
.
root
[
'zfile'
]
=
zf
=
ZBigFile
(
blksize
)
at0
=
t
.
commit
()
at0
=
t
.
commit
()
t
.
ncommit
=
0
# so that atX in the code correspond with debug output
at0_
=
t
.
commit
()
assert
tidtime
(
at0_
)
>
tidtime
(
at0
)
# >>> lookup non-BigFile -> must be rejected
# >>> lookup non-BigFile -> must be rejected
with
raises
(
OSError
)
as
exc
:
with
raises
(
OSError
)
as
exc
:
...
@@ -793,3 +786,11 @@ def tidtime(tid):
...
@@ -793,3 +786,11 @@ def tidtime(tid):
#
#
# NOTE pytest.approx supports only ==, not e.g. <, so we use plain round.
# NOTE pytest.approx supports only ==, not e.g. <, so we use plain round.
return
round
(
t
,
6
)
return
round
(
t
,
6
)
def
test_tidtime_notrough
():
t
=
tDB
()
defer
(
t
.
close
)
at0
=
t
.
commit
()
at1
=
t
.
commit
()
assert
tidtime
(
at1
)
>
tidtime
(
at0
)
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