class_docstr: Checks all functions of the LocalFileDriver
class_docstr_tok: ["Checks","all","functions","of","the","LocalFileDriver"]
code: def test_create_collection(self):
      self.local_file_driver.init()
      collections_path = os.path.join(
          self.local_file_driver.datmo_directory, "collections"
      )
  
      # Test empty file collection already exists
      filehash_empty, _, _ = self.local_file_driver.create_collection(
          []
      )
      collection_path_empty = os.path.join(
          collections_path, filehash_empty
      )
  
      assert os.path.isdir(collection_path_empty)
      assert len(os.listdir(collections_path)) == 1
  
      # Test creating another empty file collection (should not fail again)
      filehash_empty, _, _ = self.local_file_driver.create_collection(
          []
      )
      collection_path_empty = os.path.join(
          collections_path, filehash_empty
      )
  
      assert os.path.isdir(collection_path_empty)
      assert len(os.listdir(collections_path)) == 1
  
      # Create test directories to move
      self.local_file_driver.create("dirpath1", directory=True)
      self.local_file_driver.create("dirpath2", directory=True)
      self.local_file_driver.create("filepath1")
  
      dirpath1 = os.path.join(self.local_file_driver.root, "dirpath1")
      dirpath2 = os.path.join(self.local_file_driver.root, "dirpath2")
      filepath1 = os.path.join(self.local_file_driver.root, "filepath1")
      filehash, _, _ = self.local_file_driver.create_collection(
          [dirpath1, dirpath2, filepath1]
      )
      collection_path = os.path.join(collections_path, filehash)
  
      assert os.path.isdir(collection_path)
      assert len(os.listdir(collections_path)) == 2
      # Run these for all platforms
      assert os.path.isdir(os.path.join(collection_path, "dirpath1"))
      assert os.path.isdir(os.path.join(collection_path, "dirpath2"))
      assert os.path.isfile(os.path.join(collection_path, "filepath1"))
  
      # Only assume success for non-Windows platforms
      if not platform.system() == "Windows":
          assert (
              oct(
                  os.stat(
                      os.path.join(collection_path, "dirpath1")
                  ).st_mode
                  & 0o777
              )
              == "0o755"
              or oct(
                  os.stat(
                      os.path.join(collection_path, "dirpath1")
                  ).st_mode
                  & 0o777
              )
              == "0755"
          )
          assert (
              oct(
                  os.stat(
                      os.path.join(collection_path, "dirpath2")
                  ).st_mode
                  & 0o777
              )
              == "0o755"
              or oct(
                  os.stat(
                      os.path.join(collection_path, "dirpath2")
                  ).st_mode
                  & 0o777
              )
              == "0755"
          )
          assert (
              oct(
                  os.stat(
                      os.path.join(collection_path, "filepath1")
                  ).st_mode
                  & 0o777
              )
              == "0o755"
              or oct(
                  os.stat(
                      os.path.join(collection_path, "filepath1")
                  ).st_mode
                  & 0o777
              )
              == "0755"
          )
      # TODO: Create test for Windows platform
      # else:
      #     assert (oct(
      #         os.stat(os.path.join(collection_path, "dirpath1")).st_mode &
      #         0o777) == '0o777' or oct(
      #             os.stat(os.path.join(collection_path, "dirpath1")).st_mode
      #             & 0o777) == '0777')
      #     assert (oct(
      #         os.stat(os.path.join(collection_path, "dirpath2")).st_mode &
      #         0o777) == '0o777' or oct(
      #             os.stat(os.path.join(collection_path, "dirpath2")).st_mode
      #             & 0o777) == '0777')
      #     assert (oct(
      #         os.stat(os.path.join(collection_path, "filepath1")).st_mode &
      #         0o777) == '0o777' or oct(
      #             os.stat(os.path.join(collection_path, "filepath1")).st_mode
      #             & 0o777) == '0777')
  
      self.local_file_driver.delete_collection(filehash)
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import shutil
  import tempfile
  import platform
  from io import TextIOWrapper
  from datmo.core.util.misc_functions import get_datmo_temp_path
  from datmo.core.controller.file.driver.local import LocalFileDriver
  from datmo.core.util.exceptions import PathDoesNotExist
  from datmo.config import Config
label_desc: Use image node_id 30 for calling the TestLocalFileDriver obj's underlying member method code with example usage: obj.test_create_collection() without return types