Commit 7f308642 authored by jvoisin's avatar jvoisin
Browse files

Build some testfiles at runtime

parent d23b5523
I am a nasty file with a \n in my name.
......@@ -73,17 +73,15 @@ class TestFileAttributes(unittest.TestCase):
test various stuffs about files (readable, writable, exist, ...)
def test_not_writtable(self):
''' test MAT's behaviour on non-writable file'''
self.assertFalse(MAT.mat.create_class_file('not_writtable', False, add2archive=True))
def test_not_exist(self):
''' test MAT's behaviour on non-existent file'''
self.assertFalse(MAT.mat.create_class_file('ilikecookies', False, add2archive=True))
self.assertFalse(MAT.mat.create_class_file('non_existent_file', False, add2archive=True))
def test_empty(self):
''' test MAT's behaviour on empty file'''
open('empty_file', 'a').close()
self.assertFalse(MAT.mat.create_class_file('empty_file', False, add2archive=True))
class TestSecureRemove(unittest.TestCase):
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