  class TestMaxProfit(object):
  
      def test_max_profit(self):
          stock_trader = StockTrader()
          assert_raises(TypeError, stock_trader.find_max_profit, None, None)
          assert_equal(stock_trader.find_max_profit(prices=[], k=0), [])
          prices = [5, 4, 3, 2, 1]
          k = 3
          assert_equal(stock_trader.find_max_profit(prices, k), (0, []))
          prices = [2, 5, 7, 1, 4, 3, 1, 3]
          profit, transactions = stock_trader.find_max_profit(prices, k)
 
</s> remove         assert_equal(stock_trader.find_max_profit(prices, k), (0, []))
 </s> add         self.assertEqual(stock_trader.find_max_profit(prices, k), (0, [])) </s> remove         assert_equal(profit, 10)
        assert_true(Transaction(Type.SELL,
 </s> add         self.assertEqual(profit, 10)
        self.assertTrue(Transaction(Type.SELL, </s> remove     "        assert_equal(stock_trader.find_max_profit(prices, k), (0, []))\n",
 </s> add     "        self.assertEqual(stock_trader.find_max_profit(prices, k), (0, []))\n", </s> remove     "        assert_equal(stock_trader.find_max_profit(prices, k), (0, []))\n",
 </s> add     "        self.assertEqual(stock_trader.find_max_profit(prices, k), (0, []))\n", </s> remove     "        assert_raises(TypeError, stock_trader.find_max_profit, None, None)\n",
    "        assert_equal(stock_trader.find_max_profit(prices=[], k=0), [])\n",
 </s> add     "        self.assertRaises(TypeError, stock_trader.find_max_profit, None, None)\n",
    "        self.assertEqual(stock_trader.find_max_profit(prices=[], k=0), [])\n",
        self.assertRaises(TypeError, stock_trader.find_max_profit, None, None)
        self.assertEqual(stock_trader.find_max_profit(prices=[], k=0), [])
  class TestMaxProfit(object):
  
      def test_max_profit(self):
          stock_trader = StockTrader()
        self.assertRaises(TypeError, stock_trader.find_max_profit, None, None)
        self.assertEqual(stock_trader.find_max_profit(prices=[], k=0), [])
        self.assertRaises(TypeError, stock_trader.find_max_profit, None, None)
        self.assertEqual(stock_trader.find_max_profit(prices=[], k=0), [])
          prices = [5, 4, 3, 2, 1]
          k = 3
          assert_equal(stock_trader.find_max_profit(prices, k), (0, []))
          prices = [2, 5, 7, 1, 4, 3, 1, 3]
          profit, transactions = stock_trader.find_max_profit(prices, k)
keep keep keep keep replace replace keep keep keep keep keep
 #273: Remove nose dependency for recursion_dynamic/ (#280) 
recursion_dynamic/max_profit_k/test_max_profit.py