code: def testSimple(self):
      ratio = self.__buildRatio([1, 2, 1])
      self.assertEqual(ratio[0], None)
      self.assertEqual(ratio[1], 1)
      self.assertEqual(ratio[2], -0.5)
      self.assertEqual(ratio[-1], -0.5)
      with self.assertRaises(IndexError):
          ratio[3]
  
      self.assertEqual(ratio[-2], ratio[1])
      self.assertEqual(ratio[-1], ratio[2])
  
      self.assertEqual(len(ratio.getDateTimes()), 3)
      for i in range(len(ratio)):
          self.assertEqual(ratio.getDateTimes()[i], None)
  
file_path: pyalgotrade/testcases/technical_ratio_test.py
imports: from .None import common
  from pyalgotrade.technical import ratio
  from pyalgotrade import dataseries
label_desc: Use image node_id 2 for calling the TestCase obj's underlying member method code with example usage: obj.testSimple() without return types