code: def test_environment_create(self):
      # 1) Environment definition file in project environment directory (with name / description)
      # 2) Environment definition file passed as an option
      # 3) Environment definition file in root project folder
      # 4) Environment definition file in root project folder (should return the same environment)
      # 5) No environment definition file present
      # 6) No environment definition file present (should return the same environment)
      self.__set_variables()
      # Test option 1
      # Create environment definition in project environment directory
      definition_filepath = os.path.join(
          self.project_command.project_controller.environment_driver.environment_directory_path,
          "Dockerfile",
      )
      random_text = str(uuid.uuid1())
      with open(definition_filepath, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine" + "\n"))
          f.write(to_bytes(str("RUN echo " + random_text)))
  
      self.environment_command.parse(
          [
              "environment",
              "create",
              "--name",
              "test",
              "--description",
              "test description",
          ]
      )
      result = self.environment_command.execute()
  
      assert result
      assert result.name == "test"
      assert result.description == "test description"
  
      # remove environment directory path
      shutil.rmtree(
          self.project_command.project_controller.environment_driver.environment_directory_path
      )
  
      # Test option 2
      self.__set_variables()
      random_dir = os.path.join(self.temp_dir, "random_datmo_dir")
      os.makedirs(random_dir)
      definition_filepath = os.path.join(random_dir, "Dockerfile")
      random_text = str(uuid.uuid1())
      with open(definition_filepath, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine" + "\n"))
          f.write(to_bytes(str("RUN echo " + random_text)))
  
      self.environment_command.parse(
          ["environment", "create", "--paths", definition_filepath]
      )
      result = self.environment_command.execute()
      assert result
  
      # remove directory with Dockerfile
      shutil.rmtree(random_dir)
  
      # Test option 3
      definition_filepath = os.path.join(self.temp_dir, "Dockerfile")
      random_text = str(uuid.uuid1())
      with open(definition_filepath, "wb") as f:
          f.write(to_bytes("FROM python:3.5-alpine" + "\n"))
          f.write(to_bytes(str("RUN echo " + random_text)))
  
      self.environment_command.parse(["environment", "create"])
      result = self.environment_command.execute()
      assert result
  
      # Test option 4
      self.environment_command.parse(["environment", "create"])
      result_2 = self.environment_command.execute()
      assert result == result_2
  
      os.remove(definition_filepath)
  
      # Test option 5
      self.environment_command.parse(["environment", "create"])
      result = self.environment_command.execute()
      assert result
  
      # Test option 6
      self.environment_command.parse(["environment", "create"])
      result_2 = self.environment_command.execute()
      assert result == result_2
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import glob
  import time
  import pytest
  import uuid
  import tempfile
  import shutil
  import platform
  from argparse import ArgumentError
  from datmo.cli.driver.helper import Helper
  from datmo.cli.command.environment import EnvironmentCommand
  from datmo.cli.command.project import ProjectCommand
  from datmo.core.util.misc_functions import pytest_docker_environment_failed_instantiation
  from datmo.config import Config
  from datmo.core.util.exceptions import EnvironmentDoesNotExist
label_desc: Use image node_id 6 for calling the TestEnvironmentCommand obj's underlying member method code with example usage: obj.test_environment_create() without return types