xxxxxxxxxx
# They both have pros and cons. To me, pytest is a simpler framework.
# https://docs.pytest.org/en/7.1.x/how-to/unittest.html has more information.
xxxxxxxxxx
class TestBankOperations(unittest.TestCase):
def test_insufficient_deposit(self):
# Arrange
a = BankAccount(1)
a.deposit(100)
# Act
outcome = a.withdraw(200)
# Assert
self.assertFalse(outcome)