code: def testBasic(self):
      dt = datetime.datetime.now()
      b1 = bar.BasicBar(dt, 1, 1, 1, 1, 10, 1, bar.Frequency.DAY)
      b2 = bar.BasicBar(dt, 2, 2, 2, 2, 10, 2, bar.Frequency.DAY)
      bars = bar.Bars({"a": b1, "b": b2})
      self.assertEquals(bars["a"].getClose(), 1)
      self.assertEquals(bars["b"].getClose(), 2)
      self.assertTrue("a" in bars)
      self.assertEquals(bars.items(), [("a", b1), ("b", b2)])
      self.assertEquals(bars.keys(), ["a", "b"])
      self.assertEquals(bars.getInstruments(), ["a", "b"])
      self.assertEquals(bars.getDateTime(), dt)
      self.assertEquals(bars.getBar("a").getClose(), 1)
  
file_path: pyalgotrade/testcases/bar_test.py
imports: import datetime
  from six.moves import cPickle
  from .None import common
  from pyalgotrade import bar
label_desc: Use image node_id 3 for calling the BarsTestCase obj's underlying member method code with example usage: obj.testBasic() without return types