code: def testPartialFill(self):
      order = self.__buildAcceptedLimitOrder(
          broker.Order.Action.BUY, 2, 11
      )
      self.assertEqual(order.getRemaining(), 11)
      self.assertEqual(order.getFilled(), 0)
      self.assertEqual(order.getAvgFillPrice(), None)
      self.assertEqual(order.getExecutionInfo(), None)
  
      order.addExecutionInfo(
          broker.OrderExecutionInfo(1, 8, 0, datetime.datetime.now())
      )
      self.assertTrue(order.isPartiallyFilled())
      self.assertEqual(order.getRemaining(), 3)
      self.assertEqual(order.getFilled(), 8)
      self.assertEqual(order.getAvgFillPrice(), 1)
      self.assertEqual(order.getExecutionInfo().getQuantity(), 8)
      self.assertEqual(order.getExecutionInfo().getPrice(), 1)
  
      order.addExecutionInfo(
          broker.OrderExecutionInfo(1.5, 1, 0, datetime.datetime.now())
      )
      self.assertTrue(order.isPartiallyFilled())
      self.assertEqual(order.getRemaining(), 2)
      self.assertEqual(order.getFilled(), 9)
      self.assertEqual(
          round(order.getAvgFillPrice(), 4), round(1.055555556, 4)
      )
      self.assertEqual(order.getExecutionInfo().getQuantity(), 1)
      self.assertEqual(order.getExecutionInfo().getPrice(), 1.5)
  
      order.addExecutionInfo(
          broker.OrderExecutionInfo(
              1.123, 2, 0, datetime.datetime.now()
          )
      )
      self.assertTrue(order.isFilled())
      self.assertEqual(order.getRemaining(), 0)
      self.assertEqual(order.getFilled(), 11)
      self.assertEqual(
          round(order.getAvgFillPrice(), 4), round(1.067818182, 4)
      )
      self.assertEqual(order.getExecutionInfo().getQuantity(), 2)
      self.assertEqual(order.getExecutionInfo().getPrice(), 1.123)
  
file_path: pyalgotrade/testcases/broker_test.py
imports: import datetime
  from .None import common
  from pyalgotrade import broker
label_desc: Use image node_id 4 for calling the OrderTestCase obj's underlying member method code with example usage: obj.testPartialFill() without return types