コード例 #1
0
 def test_repr_scheduling_schema_independent_slot_reservation(self):
     resource_type = CM.ResourceType("foo")
     resource_instance = CM.ResourceInstance(resource_type, "instance")
     current_resource_slot = CM.CurrentResourceSlot(resource_instance)
     repr(
         CM.SchedulingSchemaIndependentSlotReservation(
             current_resource_slot))  # No exception is raised
コード例 #2
0
    def test_repr_pq_waiting_reservation(self):
        resource_type = CM.ResourceType("foo")
        experiment_type = CM.ExperimentType("exp", "cat")
        reservation = CM.Reservation("hola", "{}", "{}", "{}", None)
        reservation.experiment_type = experiment_type

        pq_waiting_reservation = PQSM.WaitingReservation(
            resource_type, reservation.id, 50, 1, True)

        repr(pq_waiting_reservation)  # No exception is raised
コード例 #3
0
    def test_repr_pq_current_reservation(self):
        resource_type = CM.ResourceType("foo")
        resource_instance = CM.ResourceInstance(resource_type, "instance")
        current_resource_slot = CM.CurrentResourceSlot(resource_instance)
        slot_reservation = CM.SchedulingSchemaIndependentSlotReservation(
            current_resource_slot)

        experiment_type = CM.ExperimentType("exp", "cat")
        reservation = CM.Reservation("hola", "{}", "{}", "{}", None)
        reservation.experiment_type = experiment_type
        current_reservation = CM.CurrentReservation("hola")

        concrete_current_reservation = PQSM.ConcreteCurrentReservation(
            slot_reservation, current_reservation.id, 50, 100, 1, True)

        repr(concrete_current_reservation)  # No exception is raised
コード例 #4
0
 def test_repr_active_reservation_scheduler(self):
     resource_type = CM.ResourceType("foo")
     experiment_type     = CM.ExperimentType("exp", "cat")
     assoc = CM.ActiveReservationSchedulerAssociation('foo', experiment_type, resource_type)
     repr(assoc) # No exception
コード例 #5
0
 def test_repr_current_resource_slot(self):
     resource_type     = CM.ResourceType("foo")
     resource_instance = CM.ResourceInstance(resource_type, "instance")
     repr(CM.CurrentResourceSlot(resource_instance)) # No exception is raised
コード例 #6
0
 def test_repr_resource_instance(self):
     resource_type = CM.ResourceType("foo")
     repr(CM.ResourceInstance(resource_type, "foo")) # No exception is raised
コード例 #7
0
 def test_repr_resource_type(self):
     repr(CM.ResourceType("foo")) # No exception is raised