class_docstr: Checks all functions of the FileCodeDriver
class_docstr_tok: ["Checks","all","functions","of","the","FileCodeDriver"]
code: def test_delete_ref(self):
      # Test failure, not initialized
      failed = False
      try:
          self.file_code_driver.create_ref()
      except CodeNotInitialized:
          failed = True
      assert failed
      self.__setup()
      commit_hash = "69a329523ce1ec88bf63061863d9cb14"
      # Test trying to delete failure
      failed = False
      try:
          self.file_code_driver.delete_ref(commit_id=commit_hash)
      except FileIOError:
          failed = True
      assert failed
      # Test successful deletion
      commit_hash = self.file_code_driver.create_ref()
      result = self.file_code_driver.delete_ref(commit_id=commit_hash)
      assert result
      commit_filepath = os.path.join(
          self.file_code_driver._code_filepath, commit_hash
      )
      assert not os.path.isfile(commit_filepath)
  
imports: from __future__ import division
  from __future__ import unicode_literals
  import os
  import time
  import shutil
  import tempfile
  import platform
  from io import open
  from datmo.core.controller.code.driver.file import FileCodeDriver
  from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist
label_desc: Use image node_id 16 for calling the TestFileCodeDriver obj's underlying member method code with example usage: obj.test_delete_ref() without return types