code: def testPeriod1(self):
      sma = self.__buildSMA(1, [10, 20])
  
      self.assertTrue(sma[0] == 10)
      self.assertTrue(sma[1] == 20)
      self.assertTrue(sma[-1] == 20)
      self.assertTrue(sma[-2] == 10)
      with self.assertRaises(IndexError):
          sma[2]
  
      with self.assertRaises(IndexError):
          sma[-3]
  
      self.assertEqual(len(sma.getDateTimes()), 2)
      for i in range(len(sma)):
          self.assertEqual(sma.getDateTimes()[i], None)
  
imports: from six.moves import xrange
  from .None import common
  from pyalgotrade.technical import ma
  from pyalgotrade import dataseries
  from pyalgotrade.barfeed import ninjatraderfeed
  from pyalgotrade import bar
label_desc: Use image node_id 2 for calling the SMATestCase obj's underlying member method code with example usage: obj.testPeriod1() without return types