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
42780810
Commit
42780810
authored
Jun 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e8aeb5d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
24 deletions
+26
-24
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+26
-24
No files found.
wcfs/wcfs_test.py
View file @
42780810
...
...
@@ -337,29 +337,6 @@ class tDB:
return
open
(
path
,
mode
,
0
)
# unbuffered
# XXX vvv misc -> tail?
# hat returns string for at.
# it gives both symbolic version and raw hex for at, for example:
# @at2 (03cf7850500b5f66)
def
hat
(
t
,
at
):
try
:
i
=
t
.
_headv
.
index
(
at
)
except
ValueError
:
return
"@"
+
h
(
at
)
return
"@at%d (%s)"
%
(
i
,
h
(
at
))
# zfiles returns ZBigFiles that were ever changed under t.
def
zfiles
(
t
):
zfs
=
set
()
for
dF
in
t
.
dFtail
:
for
zf
in
dF
.
byfile
:
if
zf
not
in
zfs
:
zfs
.
add
(
zf
)
return
zfs
# iter_revv iterates through all possible at_i -> at_j -> at_k ... sequences.
# at_i < at_j
# NOTE all sequences go till head.
...
...
@@ -1316,9 +1293,34 @@ def test_tidtime_notrough():
assert
tidtime
(
at
)
>
tidtime
(
atprev
)
# hat returns string for at.
# it gives both symbolic version and raw hex for at, for example:
# @at2 (03cf7850500b5f66)
@
func
(
tDB
)
def
hat
(
t
,
at
):
try
:
i
=
t
.
_headv
.
index
(
at
)
except
ValueError
:
return
"@"
+
h
(
at
)
return
"@at%d (%s)"
%
(
i
,
h
(
at
))
# zfiles returns ZBigFiles that were ever changed under t.
@
func
(
tDB
)
def
zfiles
(
t
):
zfs
=
set
()
for
dF
in
t
.
dFtail
:
for
zf
in
dF
.
byfile
:
if
zf
not
in
zfs
:
zfs
.
add
(
zf
)
return
zfs
# dump_history prints change history in tabular form.
# the output is useful to get overview of how file(s) are changed in tests.
#
# the output is useful while developing: to get overview of how file(s) are
# changed in tests.
@
func
(
tDB
)
def
dump_history
(
t
):
print
(
'>>> Change history by file:
\
n
'
)
...
...
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