Esempio n. 1
0
class LowerRecoveryFlow(TestFlow):
    setup = AirToBreathSetup.request()

    blocks = [
        AbstractLowerRecoverySensorFlow.params(sensors=[sensor])
        for sensor in [setup.pressure, setup.flow, setup.oxygen]
    ]
Esempio n. 2
0
class SanityFlow(TestFlow):
    setup = AirToBreathSetup.request()

    blocks = [
        AbstractTripleSensorFlow.params(sensors=[s1[0], s2[0], s3[0]],
                                        sent_values=[s1[1], s2[1], s3[1]])
        for s1, s2, s3 in create_scenarios(setup)
    ]
Esempio n. 3
0
class SanityFlow(TestFlow):
    setup = AirToBreathSetup.request()

    blocks = [
        AbstractSensorFlow.params(
            sensors=Pipe('setup', lambda setup: [setup.pressure])),
        AbstractSensorFlow.params(
            sensors=Pipe('setup', lambda setup: [setup.flow])),
        # AbstractSensorFlow.params(sensors=[setup.oxygen])
    ]
Esempio n. 4
0
class LowBoundFlow(TestFlow):
    setup = AirToBreathSetup.request()

    common = {'sent_values': [-3]}

    blocks = [
        AbstractSensorFlow.params(
            sensors=Pipe('setup', lambda setup: [setup.pressure])),
        AbstractSensorFlow.params(
            sensors=Pipe('setup', lambda setup: [setup.flow])),
        # AbstractSensorFlow.params(sensors=[setup.oxygen])
    ]
Esempio n. 5
0
class CoupleRecoveryFlow2(TestFlow):
    setup = AirToBreathSetup.request()

    blocks = [
        create_flow(
            name=f"{s1}, {s2}, {s3} combinations",
            common={'sensors': [s1, s2, s3]},
            mode=MODE_OPTIONAL,
            blocks=[ClearBuffer, StartSensorSimulation, ValidateSensors] +
            get_all_scenarios([s1, s2, s3]) +
            [StopSensorSimulation.params(mode=MODE_FINALLY)]) for s1, s2, s3 in
        combinations([setup.pressure, setup.flow, setup.oxygen], 3)
    ]