def testBuyAndSellInTwoTrades(self):
        posTracker = returns.PositionTracker(broker.IntegerTraits())
        posTracker.buy(2, 10)
        self.assertEqual(posTracker.getAvgPrice(), 10)
        posTracker.sell(1, 11)
        self.assertEqual(posTracker.getAvgPrice(), 10)
        self.assertEqual(posTracker.getPnL(), 1)
        self.assertEqual(posTracker.getReturn(), 0.05)
        posTracker.sell(1, 12)
        self.assertEqual(posTracker.getPnL(), 3)
        self.assertEqual(posTracker.getReturn(), 20.0/3)
dataset/ETHPy150Open gbeced/pyalgotrade/testcases/returns_analyzer_test.py/PosTrackerTestCase.testBuyAndSellInTwoTrades/swapped operands of `/`