Commit eee03ae4 authored by ben's avatar ben

Small testing updates


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@123 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent cfc0fc57
...@@ -48,8 +48,8 @@ class RdiffTest(unittest.TestCase): ...@@ -48,8 +48,8 @@ class RdiffTest(unittest.TestCase):
assert self.basis.lstat() and self.new.lstat() assert self.basis.lstat() and self.new.lstat()
self.signature.write_from_fileobj(Rdiff.get_signature(self.basis)) self.signature.write_from_fileobj(Rdiff.get_signature(self.basis))
assert self.signature.lstat() assert self.signature.lstat()
self.delta.write_from_fileobj(Rdiff.get_delta(self.signature, self.delta.write_from_fileobj(Rdiff.get_delta_sigrp(self.signature,
self.new)) self.new))
assert self.delta.lstat() assert self.delta.lstat()
Rdiff.patch_action(self.basis, self.delta, self.output).execute() Rdiff.patch_action(self.basis, self.delta, self.output).execute()
assert RPath.cmp(self.new, self.output) assert RPath.cmp(self.new, self.output)
...@@ -68,8 +68,8 @@ class RdiffTest(unittest.TestCase): ...@@ -68,8 +68,8 @@ class RdiffTest(unittest.TestCase):
assert self.basis.lstat() and self.new.lstat() assert self.basis.lstat() and self.new.lstat()
self.signature.write_from_fileobj(Rdiff.get_signature(self.basis)) self.signature.write_from_fileobj(Rdiff.get_signature(self.basis))
assert self.signature.lstat() assert self.signature.lstat()
self.delta.write_from_fileobj(Rdiff.get_delta(self.signature, self.delta.write_from_fileobj(Rdiff.get_delta_sigrp(self.signature,
self.new)) self.new))
assert self.delta.lstat() assert self.delta.lstat()
os.system("gzip " + self.delta.path) os.system("gzip " + self.delta.path)
os.system("mv %s %s" % (self.delta.path + ".gz", self.delta.path)) os.system("mv %s %s" % (self.delta.path + ".gz", self.delta.path))
...@@ -125,8 +125,8 @@ class RdiffTest(unittest.TestCase): ...@@ -125,8 +125,8 @@ class RdiffTest(unittest.TestCase):
assert self.basis.lstat() and self.new.lstat() assert self.basis.lstat() and self.new.lstat()
self.signature.write_from_fileobj(Rdiff.get_signature(self.basis)) self.signature.write_from_fileobj(Rdiff.get_signature(self.basis))
assert self.signature.lstat() assert self.signature.lstat()
self.delta.write_from_fileobj(Rdiff.get_delta(self.signature, self.delta.write_from_fileobj(Rdiff.get_delta_sigrp(self.signature,
self.new)) self.new))
assert self.delta.lstat() assert self.delta.lstat()
Rdiff.patch_action(self.basis, self.delta).execute() Rdiff.patch_action(self.basis, self.delta).execute()
assert RPath.cmp(self.basis, self.new) assert RPath.cmp(self.basis, self.new)
......
...@@ -72,11 +72,11 @@ class SaveStateTest(unittest.TestCase): ...@@ -72,11 +72,11 @@ class SaveStateTest(unittest.TestCase):
Time.setcurtime() Time.setcurtime()
SetConnections.BackupInitConnections(Globals.local_connection, SetConnections.BackupInitConnections(Globals.local_connection,
Globals.local_connection) Globals.local_connection)
SaveState.init_filenames(None) SaveState.init_filenames()
SaveState.record_last_file_action(last_rorp).execute() SaveState.record_last_file_action(last_rorp).execute()
sym_rp = RPath(Globals.local_connection, sym_rp = RPath(Globals.local_connection,
"testfiles/robust/last-file-mirrored.%s.data" % "testfiles/robust/last-file-incremented.%s.data" %
Time.curtimestr) Time.curtimestr)
assert sym_rp.issym() assert sym_rp.issym()
assert sym_rp.readlink() == "increments/usr/local/bin/ls" assert sym_rp.readlink() == "increments/usr/local/bin/ls"
......
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