code: def test_partial_setting(self):
      # GH2578, allow ix and friends to partially set
  
      # series
      s_orig = Series([1, 2, 3])
  
      s = s_orig.copy()
      s[5] = 5
      expected = Series([1, 2, 3, 5], index=[0, 1, 2, 5])
      tm.assert_series_equal(s, expected)
  
      s = s_orig.copy()
      s.loc[5] = 5
      expected = Series([1, 2, 3, 5], index=[0, 1, 2, 5])
      tm.assert_series_equal(s, expected)
  
      s = s_orig.copy()
      s[5] = 5.0
      expected = Series([1, 2, 3, 5.0], index=[0, 1, 2, 5])
      tm.assert_series_equal(s, expected)
  
      s = s_orig.copy()
      s.loc[5] = 5.0
      expected = Series([1, 2, 3, 5.0], index=[0, 1, 2, 5])
      tm.assert_series_equal(s, expected)
  
      # iloc/iat raise
      s = s_orig.copy()
  
      msg = "iloc cannot enlarge its target object"
      with pytest.raises(IndexError, match=msg):
          s.iloc[3] = 5.0
  
      msg = "index 3 is out of bounds for axis 0 with size 3"
      with pytest.raises(IndexError, match=msg):
          s.iat[3] = 5.0
  
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, Period, Series, Timestamp, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestPartialSetting obj's underlying member method code with example usage: obj.test_partial_setting() without return types