示例#1
0
 def test_fopenNoPerm(self):
     os.chmod(self.temp_files["File0"][1], 0o0200)
     fp = machinestate.fopen(self.temp_files["File0"][1])
     self.assertEqual(fp, None)
     if fp: fp.close()
     os.chmod(self.temp_files["File0"][1], 0o0644)
示例#2
0
 def test_fopenDir(self):
     fp = machinestate.fopen(self.temp_dir)
     self.assertEqual(fp, None)
     if fp: fp.close()
示例#3
0
 def test_fopenNotExist(self):
     fp = machinestate.fopen(self.temp_files["File0"][1] + "1234")
     self.assertEqual(fp, None)
     if fp: fp.close()
示例#4
0
 def test_fopenNone(self):
     fp = machinestate.fopen(None)
     self.assertEqual(fp, None)
     if fp: fp.close()