Ejemplo n.º 1
0
    def test_bottom_gas_mix_with_travel(self):
        """
        Test bottom gas mix depth update when travel gas mix added
        """
        ean50 = gas(50, 0, None)
        air = gas(21, 0, None)

        gas_list = GasList(air)
        gas_list.travel_gas = [ean50]

        result = gas_mix_depth_update(gas_list, 1.4, 1.6)

        self.assertEqual(1, len(result.travel_gas))
        self.assertEqual(0, result.travel_gas[0].depth)
        self.assertEqual(18, result.bottom_gas.depth)
Ejemplo n.º 2
0
    def test_travel_gas_mix(self):
        """
        Test travel gas mix depth update
        """
        ean50 = gas(50, 0, None)
        ean32 = gas(32, 0, None)
        air = gas(21, 0, None)

        gas_list = GasList(air)
        gas_list.travel_gas = [ean50, ean32]

        result = gas_mix_depth_update(gas_list, 1.4, 1.6)

        self.assertEqual(2, len(result.travel_gas))
        self.assertEqual(0, result.travel_gas[0].depth)
        self.assertEqual(18, result.travel_gas[1].depth)
        self.assertEqual(33, result.bottom_gas.depth)