Commit 5e263705 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 16dea9d0
...@@ -115,7 +115,7 @@ def test_join_autostart(): ...@@ -115,7 +115,7 @@ def test_join_autostart():
assert os.path.isdir(wc.mountpoint + "/head/bigfile") assert os.path.isdir(wc.mountpoint + "/head/bigfile")
# tDB is testing database/wcfs environment. # tDB is database/wcfs testing environment.
class tDB: class tDB:
def __init__(t): def __init__(t):
t.root = testdb.dbopen() t.root = testdb.dbopen()
...@@ -191,7 +191,7 @@ def test_wcfs(): ...@@ -191,7 +191,7 @@ def test_wcfs():
t = tDB() t = tDB()
defer(t.close) defer(t.close)
t.root['obj'] = nonfile = Persistent() t.root['!file'] = nonfile = Persistent()
t.root['zfile'] = f = ZBigFile(blksize) t.root['zfile'] = f = ZBigFile(blksize)
tid1 = t.commit() tid1 = t.commit()
...@@ -204,12 +204,13 @@ def test_wcfs(): ...@@ -204,12 +204,13 @@ def test_wcfs():
t.stat(nonfile) t.stat(nonfile)
assert exc.value.errno == EINVAL assert exc.value.errno == EINVAL
st = t.stat(f) # file initially empty
assert st.st_size == 0 _ = t.stat(f)
assert st.st_mtime == tidtime(tid1) assert _.st_size == 0
assert _.st_mtime == tidtime(tid1)
# head/at = last txn of whole db # head/at = last txn of whole db
assert t.read("head/at") == h(tid2) assert t.read("head/at") == h(t.head)
# commit data to f and make sure we can see it on wcfs # commit data to f and make sure we can see it on wcfs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment