class_docstr: Checks all functions of the FileCodeDriver
class_docstr_tok: ["Checks","all","functions","of","the","FileCodeDriver"]
code: def test_latest_ref(self):
      # Test failure, not initialized
      failed = False
      try:
          self.file_code_driver.create_ref()
      except CodeNotInitialized:
          failed = True
      assert failed
      # Test success (single commit)
      self.__setup()
      commit_hash = self.file_code_driver.create_ref()
      result = self.file_code_driver.latest_ref()
      assert result == commit_hash
      # Test success (multiple commits)
      with open(os.path.join(self.temp_dir, "test2.txt"), "wb") as f:
          f.write(to_bytes("hello"))
      time.sleep(1)
      commit_hash_2 = self.file_code_driver.create_ref()
      result = self.file_code_driver.latest_ref()
      assert commit_hash != commit_hash_2
      assert result == commit_hash_2
      # Test success after checkout
      self.file_code_driver.checkout_ref(commit_id=commit_hash)
      result = self.file_code_driver.latest_ref()
      assert result == commit_hash_2
  
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 14 for calling the TestFileCodeDriver obj's underlying member method code with example usage: obj.test_latest_ref() without return types