summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing/robusttest.py
diff options
context:
space:
mode:
Diffstat (limited to 'rdiff-backup/testing/robusttest.py')
-rw-r--r--rdiff-backup/testing/robusttest.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/rdiff-backup/testing/robusttest.py b/rdiff-backup/testing/robusttest.py
index 6b9e356..17b4ac2 100644
--- a/rdiff-backup/testing/robusttest.py
+++ b/rdiff-backup/testing/robusttest.py
@@ -4,42 +4,6 @@ from commontest import *
from rdiff_backup import rpath, robust, TempFile, Globals
-class TempFileTest(unittest.TestCase):
- """Test creation and management of tempfiles in TempFile module"""
- rp_base = rpath.RPath(Globals.local_connection,
- "./testfiles/robust/testfile_base")
- def testBasic(self):
- """Make a temp file, write to it, and then delete it
-
- Also test tempfile accounting and file name prefixing.
-
- """
- assert not TempFile._tempfiles
- tf = TempFile.new(self.rp_base)
- assert TempFile._tempfiles == [tf]
- assert tf.dirsplit()[0] == "testfiles/robust", tf.dirsplit()[0]
- assert not tf.lstat()
- fp = tf.open("w")
- fp.write("hello")
- assert not fp.close()
- fp = tf.open("r")
- assert fp.read() == "hello"
- assert not fp.close()
- tf.delete()
- assert not TempFile._tempfiles
-
- def testRename(self):
- """Test renaming of tempfile"""
- tf = TempFile.new(self.rp_base)
- assert TempFile._tempfiles
- tf.touch()
- destination = rpath.RPath(Globals.local_connection,
- "./testfiles/robust/testfile_dest")
- tf.rename(destination)
- assert not TempFile._tempfiles
- assert destination.lstat()
- destination.delete()
-
class RobustTest(unittest.TestCase):
"""Test robust module"""
def test_check_common_error(self):