示例#1
0
 def test_repocache_notimeout(self, path1):
     repocache = svncommon.RepoCache()
     repocache.timeout = 0
     repocache.put(path1.strpath, path1.rev)
     url, rev = repocache.get(path1.strpath)
     assert rev == -1
     assert url == path1.strpath
示例#2
0
 def test_repocache_outdated(self, path1):
     repocache = svncommon.RepoCache()
     repocache.put(path1.strpath, 42, timestamp=0)
     url, rev = repocache.get(path1.join('test').strpath)
     assert rev == -1
     assert url == path1.strpath
示例#3
0
 def test_repocache_simple(self, path1):
     repocache = svncommon.RepoCache()
     repocache.put(path1.strpath, 42)
     url, rev = repocache.get(path1.join('test').strpath)
     assert rev == 42
     assert url == path1.strpath