code: def test_setup(self):
      # TODO: Run all environment options and test if success
      self.project_controller.init("test_setup", "test description")
      self.environment_controller = EnvironmentController()
  
      # Test success setup once (no files present)
      options = {
          "environment_framework": "data-analytics",
          "environment_type": "cpu",
          "environment_language": "py27",
      }
      result = self.environment_controller.setup(options=options)
      output_definition_filepath = os.path.join(
          self.environment_controller.environment_driver.environment_directory_path,
          "Dockerfile",
      )
  
      assert isinstance(result, Environment)
      assert result.name == "%s:%s-%s" % (
          options["environment_framework"],
          options["environment_type"],
          options["environment_language"],
      )
      assert (
          result.description == "supported environment created by datmo"
      )
      assert os.path.isfile(output_definition_filepath)
      assert (
          "FROM datmo/data-analytics:cpu-py27"
          in open(output_definition_filepath, "r").read()
      )
      # Test success setup again (files present, but staged)
      options = {
          "environment_framework": "data-analytics",
          "environment_type": "cpu",
          "environment_language": "py27",
      }
      result = self.environment_controller.setup(options=options)
      output_definition_filepath = os.path.join(
          self.environment_controller.environment_driver.environment_directory_path,
          "Dockerfile",
      )
  
      assert isinstance(result, Environment)
      assert result.name == "%s:%s-%s" % (
          options["environment_framework"],
          options["environment_type"],
          options["environment_language"],
      )
      assert (
          result.description == "supported environment created by datmo"
      )
      assert os.path.isfile(output_definition_filepath)
      assert (
          "FROM datmo/data-analytics:cpu-py27"
          in open(output_definition_filepath, "r").read()
      )
  
      # Test failure in downstream function (e.g. bad inputs, no name given)
      failed = False
      try:
          self.environment_controller.setup(options={})
      except EnvironmentDoesNotExist:
          failed = True
      assert failed
  
      # Change environment file
      with open(output_definition_filepath, "wb") as f:
          f.write(to_bytes("new content"))
  
      # Test failure setup (unstaged changes)
      failed = False
      try:
          self.environment_controller.setup(options=options)
      except UnstagedChanges:
          failed = True
      assert failed
  
imports: import os
  import uuid
  import threading
  import tempfile
  import platform
  import timeout_decorator
  from io import open
  from datmo.config import Config
  from datmo.core.controller.project import ProjectController
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.core.entity.environment import Environment
  from datmo.core.util.exceptions import EntityNotFound, RequiredArgumentMissing, TooManyArgumentsFound, FileAlreadyExistsError, UnstagedChanges, EnvironmentDoesNotExist, ProjectNotInitialized
  from datmo.core.util.misc_functions import check_docker_inactive, pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 8 for calling the TestEnvironmentController obj's underlying member method code with example usage: obj.test_setup() without return types