def should_add_up(self): schedule = Schedule() schedule.add_lesson(RandomWeeklyLesson()) schedule.add_lesson(RandomWeeklyLesson()) b = Bins(schedule=schedule) b_ = b.bins() expect(b[0] + b[1] + b[2] + b[3] + b[4] + b[5]).to.equal(2) expect(b_[0] + b_[1] + b_[2] + b_[3] + b_[4] + b_[5]).to.equal(2)
def by_default_should_be_6(self): schedule = Schedule() schedule.add_lesson(RandomWeeklyLesson()) b = Bins(schedule=schedule) expect(b.num_bins()).to.equal(6)
def it_should_aggregate_the_lesson_requests_per_bin(self): schedule = Schedule() schedule.add_lesson(RandomWeeklyLesson()) b = Bins(schedule=schedule) expect(b.sum().sum()).to.equal(1)