예제 #1
0
 def test_read_file(self):
     f = tools.new_temp_file(self.test_string)
     data = tools.read_file(f)
     self.assertEqual(self.test_string, data)
     tools.delete_file(f)
     data = tools.read_file(f)
     self.assertEqual(data, 'ERROR: Cannot read file %s'%(f))
예제 #2
0
 def test_create_delete_file(self):
     f = tools.new_temp_file(self.test_string)
     self.assertNotEqual(f, None)
     tools.delete_file(f)
     data = tools.read_file(f)
     self.assertEqual(data, 'ERROR: Cannot read file %s'%(f))