original_docstring: 
      Creates a mock of the PixelOptions widget. Used for some basic testing of AddComponentDialog behaviour that requires
      interaction with the PixelOptions. Testing of the PixelOptions behaviour takes place in a dedicated file.
      
docstring: Creates a mock of the PixelOptions widget. Used for some basic testing of AddComponentDialog behaviour that requires
  interaction with the PixelOptions. Testing of the PixelOptions behaviour takes place in a dedicated file.
docstring_tokens: Creates a mock of the PixelOptions widget . Used for some basic testing of AddComponentDialog behaviour that requires interaction with the PixelOptions . Testing of the PixelOptions behaviour takes place in a dedicated file .
code: def mock_pixel_options():
      """
      Creates a mock of the PixelOptions widget. Used for some basic testing of AddComponentDialog behaviour that requires
      interaction with the PixelOptions. Testing of the PixelOptions behaviour takes place in a dedicated file.
      """
      pixel_options = Mock(spec=PixelOptions)
      pixel_options.validator = Mock(spec=PixelValidator)
      pixel_options.validator.unacceptable_pixel_states = Mock(return_value=[])
  
      # When the method for creating a pixel mapping is called in PixelOptions, it causes the current mapping filename
      # stored in PixelOptions to change. This behaviour is going to be mimicked with a side effect mock.
      def change_mapping_filename(filename):
          pixel_options.get_current_mapping_filename = Mock(return_value=filename)
  
      pixel_options.populate_pixel_mapping_list_with_mesh = Mock(
          side_effect=change_mapping_filename
      )
  
      # Make the filename in PixelOptions start as None as this is what the PixelOptions has after its been initialised.
      change_mapping_filename(None)
  
      return pixel_options
code_tokens: def mock_pixel_options ( ) : pixel_options = Mock ( spec = PixelOptions ) pixel_options . validator = Mock ( spec = PixelValidator ) pixel_options . validator . unacceptable_pixel_states = Mock ( return_value = [ ] ) def change_mapping_filename ( filename ) : pixel_options . get_current_mapping_filename = Mock ( return_value = filename ) pixel_options . populate_pixel_mapping_list_with_mesh = Mock ( side_effect = change_mapping_filename ) change_mapping_filename ( None ) return pixel_options
short_docstring: Creates a mock of the PixelOptions widget.
short_docstring_tokens: Creates a mock of the PixelOptions widget .
comment: """
      Creates a mock of the PixelOptions widget. Used for some basic testing of AddComponentDialog behaviour that requires
      interaction with the PixelOptions. Testing of the PixelOptions behaviour takes place in a dedicated file.
      """$SEP$# When the method for creating a pixel mapping is called in PixelOptions, it causes the current mapping filename$SEP$# stored in PixelOptions to change. This behaviour is going to be mimicked with a side effect mock.$SEP$# Make the filename in PixelOptions start as None as this is what the PixelOptions has after its been initialised.