From 0f383c16278f6ef0959a6d3aa7fcf21cd2c4c730 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 27 Jun 2002 20:21:55 +0000 Subject: Adapted a few tests to go with other code. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@150 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/testing/highleveltest.py | 5 +++++ rdiff-backup/testing/rdifftest.py | 1 + rdiff-backup/testing/statisticstest.py | 4 ++++ 3 files changed, 10 insertions(+) (limited to 'rdiff-backup') diff --git a/rdiff-backup/testing/highleveltest.py b/rdiff-backup/testing/highleveltest.py index c46f528..c55694b 100644 --- a/rdiff-backup/testing/highleveltest.py +++ b/rdiff-backup/testing/highleveltest.py @@ -19,6 +19,11 @@ class RemoteMirrorTest(unittest.TestCase): MirrorTest(1, None, ['testfiles/increment1', 'testfiles/increment2', 'testfiles/increment3', 'testfiles/increment4']) + def testMirror3(self): + """Local version of testMirror2""" + MirrorTest(1, 1, ['testfiles/increment1', 'testfiles/increment2', + 'testfiles/increment3', 'testfiles/increment4']) + def testMirrorWithCheckpointing(self): """Like testMirror but this time checkpoint""" MirrorTest(None, None, ["testfiles/increment1"], 1) diff --git a/rdiff-backup/testing/rdifftest.py b/rdiff-backup/testing/rdifftest.py index 223e7a1..92ba12e 100644 --- a/rdiff-backup/testing/rdifftest.py +++ b/rdiff-backup/testing/rdifftest.py @@ -82,6 +82,7 @@ class RdiffTest(unittest.TestCase): def testWriteDelta(self): """Test write delta feature of rdiff""" + self.delta.delete() rplist = [self.basis, self.new, self.delta, self.output] MakeRandomFile(self.basis.path) MakeRandomFile(self.new.path) diff --git a/rdiff-backup/testing/statisticstest.py b/rdiff-backup/testing/statisticstest.py index 032badc..819bb85 100644 --- a/rdiff-backup/testing/statisticstest.py +++ b/rdiff-backup/testing/statisticstest.py @@ -70,6 +70,10 @@ IncrementFileSize 10 (10 bytes) statline = s.get_stats_line(()) assert statline == ". 1 2 13 14 3 4 5 6 7 8 9 15 10" + statline = s.get_stats_line(("file name with spaces",)) + assert statline == "file\\x20name\\x20with\\x20spaces 1 2 13 14 " \ + "3 4 5 6 7 8 9 15 10", repr(statline) + def test_byte_summary(self): """Test conversion of bytes to strings like 7.23MB""" s = StatsObj() -- cgit v1.2.1