Exemplo n.º 1
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
Exemplo n.º 2
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
Exemplo n.º 3
0
 def test_repr_current_reservation(self):
     experiment_type = CM.ExperimentType("exp", "cat")
     reservation     = CM.Reservation("hi", "{}", "{}", "{}", None)
     reservation.experiment_type = experiment_type
     current_reservation = CM.CurrentReservation("hi")
     repr(current_reservation) # No exception is raised