def test_total_pay_basic() -> None: e = SalariedEmployee(14, 'Gilbert the cat', 1200.0) e.pay(date(2018, 6, 28)) e.pay(date(2018, 7, 28)) e.pay(date(2018, 8, 28)) assert e.total_pay() == 300.0 e = HourlyEmployee(11, 'a', 0, 1.0) e.pay(date(2018, 6, 28)) assert e.total_pay() == 0 e = HourlyEmployee(11, 'a', 40, 19.0) e.pay(date(2018, 6, 28)) e.pay(date(2018, 7, 28)) e.pay(date(2018, 8, 28)) assert e.total_pay() == 2280 e = HourlyEmployee(11, 'a', 40, 19.0) assert e.total_pay() == 0
def test_total_pay_mixed() -> None: e = SalariedEmployee(14, 'Gilbert the cat', 1200.0) f = HourlyEmployee(25, 'Chairman Meow', 500.25, 1.0) e.pay(date(2018, 6, 28)) e.pay(date(2018, 7, 28)) f.pay(date(2018, 8, 28)) assert e.total_pay() == 200.0 assert f.total_pay() == 500.25
def test_total_pay_basic() -> None: e = SalariedEmployee(14, 'Gilbert the cat', 1200) e.pay(date(2018, 6, 28)) e.pay(date(2018, 7, 28)) e.pay(date(2018, 8, 28)) assert e.total_pay() == 300.0