]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/t/tindex.py
index: only collect metadata for stale paths
[bup.git] / lib / bup / t / tindex.py
index c597b96aa2364c6cc0073ee3b421790c37f47a38..6639e0b939fcd5f7584c15efaebf42055d6b4353 100644 (file)
@@ -77,19 +77,16 @@ def index_negative_timestamps():
             # Dec 31, 1969
             os.utime(foopath, (-86400, -86400))
             ns_per_sec = 10**9
-            tstart = time.time() * ns_per_sec
-            tmax = tstart - ns_per_sec
+            tmax = (time.time() - 1) * ns_per_sec
             e = index.BlankNewEntry(foopath, 0, tmax)
-            e.from_stat(xstat.stat(foopath), 0, tstart)
-            assert len(e.packed())
-            WVPASS()
+            e.update_from_stat(xstat.stat(foopath), 0)
+            WVPASS(e.packed())
 
             # Jun 10, 1893
             os.utime(foopath, (-0x80000000, -0x80000000))
             e = index.BlankNewEntry(foopath, 0, tmax)
-            e.from_stat(xstat.stat(foopath), 0, tstart)
-            assert len(e.packed())
-            WVPASS()
+            e.update_from_stat(xstat.stat(foopath), 0)
+            WVPASS(e.packed())
 
 
 @wvtest