code: def test_environment_setup_prompt(self):
      self.__set_variables()
      # Setup the environement by passing name
      definition_filepath = os.path.join(
          self.project_command.project_controller.environment_driver.environment_directory_path,
          "Dockerfile",
      )
  
      # Test success with correct prompt input using numbers
      self.environment_command.parse(["environment", "setup"])
  
      @self.environment_command.cli_helper.input(
          "cpu\ndata-analytics\npy27\n"
      )
      def dummy(self):
          return self.environment_command.execute()
  
      result = dummy(self)
      assert result
      assert os.path.isfile(definition_filepath)
      assert (
          "FROM datmo/data-analytics:cpu-py27"
          in open(definition_filepath, "r").read()
      )
  
      # Test success with correct prompt input using numbers
      self.environment_command.parse(["environment", "setup"])
  
      @self.environment_command.cli_helper.input("cpu\ncaffe2\n")
      def dummy(self):
          return self.environment_command.execute()
  
      result = dummy(self)
      assert result
      assert os.path.isfile(definition_filepath)
      assert (
          "FROM datmo/caffe2:cpu"
          in open(definition_filepath, "r").read()
      )
  
      # Test success with correct prompt input using string
      self.environment_command.parse(["environment", "setup"])
  
      @self.environment_command.cli_helper.input("1\n1\n1\n")
      def dummy(self):
          return self.environment_command.execute()
  
      result = dummy(self)
      assert result
      assert os.path.isfile(definition_filepath)
      assert "FROM datmo" in open(definition_filepath, "r").read()
  
      # Test with prompt input number out of range
      self.environment_command.parse(["environment", "setup"])
  
      @self.environment_command.cli_helper.input("-1\n\n\n")
      def dummy(self):
          return self.environment_command.execute()
  
      result = dummy(self)
      assert result
      assert os.path.isfile(definition_filepath)
      assert (
          "FROM datmo/python-base:cpu-py27"
          in open(definition_filepath, "r").read()
      )
  
      # Test with prompt input string incorrect
      self.environment_command.parse(["environment", "setup"])
  
      # quit at environment type
      @self.environment_command.cli_helper.input("quit\n")
      def dummy(self):
          return self.environment_command.execute()
  
      with pytest.raises(SystemExit) as pytest_wrapped_e:
          dummy(self)
  
      assert pytest_wrapped_e.type == SystemExit
      assert pytest_wrapped_e.value.code == 0
  
      # quit at environment framework
      @self.environment_command.cli_helper.input("\nquit\n")
      def dummy(self):
          return self.environment_command.execute()
  
      with pytest.raises(SystemExit) as pytest_wrapped_e:
          dummy(self)
  
      assert pytest_wrapped_e.type == SystemExit
      assert pytest_wrapped_e.value.code == 0
  
      # quit at environment language
      @self.environment_command.cli_helper.input("\n\nquit\n")
      def dummy(self):
          return self.environment_command.execute()
  
      with pytest.raises(SystemExit) as pytest_wrapped_e:
          dummy(self)
  
      assert pytest_wrapped_e.type == SystemExit
      assert pytest_wrapped_e.value.code == 0
  
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 5 for calling the TestEnvironmentCommand obj's underlying member method code with example usage: obj.test_environment_setup_prompt() and returns: self, self, self, self, self, self, self