def test_absolute_fullness() -> None: t = Truck(69, 420, "Toronto") p = Parcel(1, 60, "Cape Town", "Barrie") t.pack(p) assert t.capacity - t.absolute_fullness() == 360
def _less_truck_space(t1: Truck, t2: Truck) -> bool: """ Returns True if Truck <t1> has less truck space. False otherwise. """ return (t1.capacity - t1.absolute_fullness()) < \ (t2.capacity - t2.absolute_fullness())