def test_inf_spend(self):
     acc = BudgetAccountant()
     acc.spend(float("inf"), 1)
     self.assertEqual((float("inf"), 1), acc.total())
     self.assertEqual((float("inf"), 1), acc.remaining())
     self.assertEqual((float("inf"), 1), acc.remaining(100))
     self.assertTrue(acc.check(float("inf"), 1))
    def test_spent_budget(self):
        acc = BudgetAccountant(1, 0, spent_budget=[(0.5, 0), (0.5, 0)])

        with self.assertRaises(BudgetError):
            acc.check(0.1, 0)