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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
91592050
Commit
91592050
authored
Jun 07, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b96008cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+11
-4
No files found.
wcfs/wcfs_test.py
View file @
91592050
...
...
@@ -484,6 +484,9 @@ class tFile:
# Expected data may be given with size < t.blksize. In such case the data
# is implicitly appended with trailing zeros. Data can be both bytes and unicode.
#
# It also checks that file watches are properly notified on data access -
# - see "7.2) for all registered client@at watchers ..."
#
# pinokByWLink: {} tWatchLink -> (zf, {} blk -> at).
# pinokByWLink can be None - in that case it is computed automatically.
def
assertBlk
(
t
,
blk
,
dataok
,
pinokByWLink
=
None
):
...
...
@@ -503,9 +506,13 @@ class tFile:
pinok
=
{}
if
t
.
at
is
None
:
# @head/...
wat
=
wlink
.
_watching
.
get
(
zf
)
if
wat
is
not
None
and
wat
<
blkrev
and
cached
==
0
:
# XXX and watch not already pinned on the watch
pinok
=
{
blk
:
t
.
tdb
.
_blkRev
(
t
.
zf
,
blk
,
wat
)}
if
wat
is
not
None
and
wat
<
blkrev
:
if
cached
==
1
:
# XXX assert blk already pinned on that watch
pass
else
:
# XXX and watch not already pinned on the watch
pinok
=
{
blk
:
t
.
tdb
.
_blkRev
(
t
.
zf
,
blk
,
wat
)}
wpin
[
wlink
]
=
(
t
.
zf
,
pinok
)
if
pinokByWLink
is
not
None
:
...
...
@@ -540,7 +547,7 @@ class tFile:
ev
=
doCheckingPin
(
_
,
pinokByWLink
)
# XXX hack - wlinks are notified and emit events simultaneously - we
# check only that events begin and end with read
-related
and that pins
# check only that events begin and end with read
pre/post
and that pins
# are inside. Better do explicit check in tracetest style.
assert
ev
[
0
]
==
'read pre'
assert
ev
[
-
1
]
==
'read '
+
dataok
[
0
]
...
...
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