summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/empty_file0
-rw-r--r--test/end\nline1
-rw-r--r--test/libtest.py8
3 files changed, 3 insertions, 6 deletions
diff --git a/test/empty_file b/test/empty_file
deleted file mode 100644
index e69de29..0000000
--- a/test/empty_file
+++ /dev/null
diff --git a/test/end\nline b/test/end\nline
deleted file mode 100644
index 35b4964..0000000
--- a/test/end\nline
+++ /dev/null
@@ -1 +0,0 @@
1I am a nasty file with a \n in my name.
diff --git a/test/libtest.py b/test/libtest.py
index c2cb2f1..fdef091 100644
--- a/test/libtest.py
+++ b/test/libtest.py
@@ -73,17 +73,15 @@ class TestFileAttributes(unittest.TestCase):
73 ''' 73 '''
74 test various stuffs about files (readable, writable, exist, ...) 74 test various stuffs about files (readable, writable, exist, ...)
75 ''' 75 '''
76 def test_not_writtable(self):
77 ''' test MAT's behaviour on non-writable file'''
78 self.assertFalse(MAT.mat.create_class_file('not_writtable', False, add2archive=True))
79
80 def test_not_exist(self): 76 def test_not_exist(self):
81 ''' test MAT's behaviour on non-existent file''' 77 ''' test MAT's behaviour on non-existent file'''
82 self.assertFalse(MAT.mat.create_class_file('ilikecookies', False, add2archive=True)) 78 self.assertFalse(MAT.mat.create_class_file('non_existent_file', False, add2archive=True))
83 79
84 def test_empty(self): 80 def test_empty(self):
85 ''' test MAT's behaviour on empty file''' 81 ''' test MAT's behaviour on empty file'''
82 open('empty_file', 'a').close()
86 self.assertFalse(MAT.mat.create_class_file('empty_file', False, add2archive=True)) 83 self.assertFalse(MAT.mat.create_class_file('empty_file', False, add2archive=True))
84 os.remove('empty_file')
87 85
88 86
89class TestSecureRemove(unittest.TestCase): 87class TestSecureRemove(unittest.TestCase):