def test_move(self):
     try:
         do = DirectoryObject("test", temporary=True)
         do.move("test_move")
         if not os.path.exists("test_move"):
             raise Exception("Failed to move")
     except Exception as exc:
         traceback.print_exc()
         self.fail(exc)
 def test_move_chmod(self):
     try:
         do = DirectoryObject("test", temporary=True)
         do.move("test_move")
         do.chmod(0o644)
         if oct(os.stat(do.path).st_mode & 0o777) != oct(0o644):
             raise Exception("Wrong mode of moved directory")
     except Exception as exc:
         traceback.print_exc()
         self.fail(exc)