def test_24_hours_shifts(self):
        # 1 hour to load, 1 hour to produce
        # produce 2 every 2 hours
        # ie 24 - 1 (1 to start the machine) / 2 = 10
        machine, spec, stock = create_machine(stocking_zone_size=None)
        factory = Factory()
        factory.add_worker(Worker(working_hour = 8 * 60))
        factory.add_worker(Worker(working_hour = 8 * 60))
        factory.add_worker(Worker(working_hour = 8 * 60))
        factory.add_production_unit(machine)
        factory.run(24 * 60)

        self.assertEquals(stock.count(), 720 - 1)
Beispiel #2
0
 def test_factory_is_aware_of_time(self):
     factory = Factory()
     factory.run()
     assert_that(factory.time, is_(1))
 def test_factory_is_aware_of_time(self):
     factory = Factory()
     factory.run()
     assert_that(factory.time, is_(1))