test_tool_6.py 405 B

123456789101112131415161718
  1. def test_make_executable(self):
  2. tmp_dir = self.get_temp_dir() + os.sep +"programy"
  3. if os.path.exists(tmp_dir):
  4. shutil.rmtree(tmp_dir)
  5. os.mkdir(tmp_dir)
  6. filepath = tmp_dir + os.sep + "file1.txt"
  7. self.create_file(filepath)
  8. self.assertTrue(os.path.exists(filepath))
  9. AdminTool.make_executable(filepath)
  10. if os.path.exists(tmp_dir):
  11. shutil.rmtree(tmp_dir)