当前位置: 首页>>代码示例>>Python>>正文


Python Tank.get_end_for_given_depth方法代码示例

本文整理汇总了Python中dipplanner.tank.Tank.get_end_for_given_depth方法的典型用法代码示例。如果您正苦于以下问题:Python Tank.get_end_for_given_depth方法的具体用法?Python Tank.get_end_for_given_depth怎么用?Python Tank.get_end_for_given_depth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dipplanner.tank.Tank的用法示例。


在下文中一共展示了Tank.get_end_for_given_depth方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestTankNitrox32

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankNitrox32(TestTank):
    def setUp(self):
        self.mytank = Tank(f_o2=0.32)

    def test_name(self):
        assert str(self.mytank) == "Nitrox 32"

    def test_mod(self):
        assert self.mytank.mod == 40

    def test_mod_at_end(self):
        self.assertAlmostEqual(
            self.mytank.get_mod_for_given_end(30),
            31.0195918624,
            5,
            "wrong mod at end:%s" % self.mytank.get_mod_for_given_end(30),
        )

    def test_end_at_depth(self):
        self.assertAlmostEqual(
            self.mytank.get_end_for_given_depth(40),
            38.7573409377,
            5,
            "wrong end at depth:%s" % self.mytank.get_end_for_given_depth(40),
        )
开发者ID:hordurk,项目名称:dipplanner,代码行数:27,代码来源:tank_test.py

示例2: TestTankisHeliox2080_2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisHeliox2080_2(TestTank):
    def setUp(self):
        self.mytank = Tank(f_o2=0.2, f_he=0.8, max_ppo2=1.4)

    def test_name(self):
        assert str(self.mytank) == "Heliox 20/80"

    def test_mod(self):
        assert self.mytank.mod == 59

    def test_mod_at_end(self):
        self.assertAlmostEqual(
            self.mytank.get_mod_for_given_end(30),
            96.8666243516,
            5,
            "wrong mod at end:%s" % self.mytank.get_mod_for_given_end(30),
        )

    def test_end_at_depth(self):
        self.assertAlmostEqual(
            self.mytank.get_end_for_given_depth(40),
            8.70562703148,
            5,
            "wrong end at depth:%s" % self.mytank.get_end_for_given_depth(40),
        )
开发者ID:hordurk,项目名称:dipplanner,代码行数:27,代码来源:tank_test.py

示例3: TestTankisAir

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisAir(TestTank):
    def setUp(self):
        self.mytank = Tank()

    def test_name(self):
        assert str(self.mytank) == "Air"

    def test_mod(self):
        assert self.mytank.mod == 66

    def test_mod_at_end(self):
        self.assertAlmostEqual(
            self.mytank.get_mod_for_given_end(30),
            31.0195918624,
            5,
            "wrong mod at end:%s" % self.mytank.get_mod_for_given_end(30),
        )

    def test_end_at_depth(self):
        self.assertAlmostEqual(
            self.mytank.get_end_for_given_depth(40),
            38.7573409377,
            5,
            "wrong end at depth:%s" % self.mytank.get_end_for_given_depth(40),
        )

    def test_tank_info(self):
        self.assertEqual(
            self.mytank.get_tank_info(),
            "12.0l-100.0% (2423.10/2423.10l)",
            "Wrong Tank infos: %s" % self.mytank.get_tank_info(),
        )
开发者ID:hordurk,项目名称:dipplanner,代码行数:34,代码来源:tank_test.py

示例4: TestTankisTrimix2030_2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisTrimix2030_2(TestTank):
    def setUp(self):
        self.mytank = Tank(f_o2=0.2, f_he=0.3, max_ppo2=1.4)

    def test_name(self):
        assert str(self.mytank) == "Trimix 20/30"

    def test_mod(self):
        assert self.mytank.mod == 59

    def test_mod_at_end(self):
        self.assertAlmostEqual(
            self.mytank.get_mod_for_given_end(30),
            43.3498554235,
            5,
            "wrong mod at end:%s" % self.mytank.get_mod_for_given_end(30),
        )

    def test_end_at_depth(self):
        self.assertAlmostEqual(
            self.mytank.get_end_for_given_depth(40),
            27.4879482229,
            5,
            "wrong end at depth:%s" % self.mytank.get_end_for_given_depth(40),
        )
开发者ID:hordurk,项目名称:dipplanner,代码行数:27,代码来源:tank_test.py

示例5: TestTankisTrimix870_2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisTrimix870_2(TestTank):
    def setUp(self):
        self.mytank = Tank(f_o2=0.08, f_he=0.7, max_ppo2=1.4)

    def test_name(self):
        assert str(self.mytank) == "Trimix 8/70"

    def test_mod(self):
        assert self.mytank.mod == 165

    def test_min_od(self):
        assert self.mytank.get_min_od() == 10

    def test_mod_at_end(self):
        self.assertAlmostEqual(
            self.mytank.get_mod_for_given_end(30),
            79.0122229175,
            5,
            "wrong mod at end:%s" % self.mytank.get_mod_for_given_end(30),
        )

    def test_end_at_depth(self):
        self.assertAlmostEqual(
            self.mytank.get_end_for_given_depth(40),
            12.4620912698,
            5,
            "wrong end at depth:%s" % self.mytank.get_end_for_given_depth(40),
        )
开发者ID:hordurk,项目名称:dipplanner,代码行数:30,代码来源:tank_test.py

示例6: TestTankNitrox32

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankNitrox32(TestTank):
    """Test Nitrox32 Tank."""

    def setUp(self):
        """Init of the tests."""
        super().setUp()

        self.mytank = Tank(f_o2=0.32)

    def test_name(self):
        """Check Name."""
        assert str(self.mytank) == 'Nitrox 32'

    def test_mod(self):
        """Check Calculated mod."""
        assert self.mytank.mod == 40

    def test_mod_at_end(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_mod_for_given_end(30),
                               31.0195918624, 5, 'wrong mod at end:%s'
                               % self.mytank.get_mod_for_given_end(30))

    def test_end_at_depth(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_end_for_given_depth(40),
                               38.7573409377, 5, 'wrong end at depth:%s'
                               % self.mytank.get_end_for_given_depth(40))
开发者ID:ThomasChiroux,项目名称:dipplanner,代码行数:30,代码来源:tank_test.py

示例7: TestTankisO2_2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisO2_2(TestTank):
    def setUp(self):
        self.mytank = Tank(f_o2=1, max_ppo2=1.4)

    def test_name(self):
        assert str(self.mytank) == "Oxygen"

    def test_mod(self):
        assert self.mytank.mod == 4

    def test_mod_at_end(self):
        self.assertAlmostEqual(
            self.mytank.get_mod_for_given_end(30),
            31.0195918624,
            5,
            "wrong mod at end:%s" % self.mytank.get_mod_for_given_end(30),
        )

    def test_end_at_depth(self):
        self.assertAlmostEqual(
            self.mytank.get_end_for_given_depth(40),
            38.7573409377,
            5,
            "wrong end at depth:%s" % self.mytank.get_end_for_given_depth(40),
        )
开发者ID:hordurk,项目名称:dipplanner,代码行数:27,代码来源:tank_test.py

示例8: TestTankisAir

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisAir(TestTank):
    """Test Air Tank."""

    def setUp(self):
        """Init of the tests."""
        super().setUp()

        self.mytank = Tank()

    def test_name(self):
        """Check Name."""
        assert str(self.mytank) == 'Air'

    def test_mod(self):
        """Check Calculated mod."""
        assert self.mytank.mod == 66

    def test_mod_at_end(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_mod_for_given_end(30),
                               31.0195918624, 5, 'wrong mod at end:%s'
                               % self.mytank.get_mod_for_given_end(30))

    def test_end_at_depth(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_end_for_given_depth(40),
                               38.7573409377, 5, 'wrong end at depth:%s'
                               % self.mytank.get_end_for_given_depth(40))

    def test_tank_info(self):
        """Check str output."""
        self.assertEqual(self.mytank.tank_info,
                         '12.0l-100.0% (2423.10/2423.10l)',
                         "Wrong Tank infos: %s"
                         % self.mytank.tank_info)
开发者ID:ThomasChiroux,项目名称:dipplanner,代码行数:37,代码来源:tank_test.py

示例9: TestTankisHeliox2080_2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisHeliox2080_2(TestTank):
    """Test Heliox2080 Tank 2."""

    def setUp(self):
        """Init of the tests."""
        super().setUp()

        self.mytank = Tank(f_o2=0.2, f_he=0.8, max_ppo2=1.4)

    def test_name(self):
        """Check Name."""
        assert str(self.mytank) == 'Heliox 20/80'

    def test_mod(self):
        """Check Calculated mod."""
        assert self.mytank.mod == 59

    def test_mod_at_end(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_mod_for_given_end(30),
                               96.8666243516, 5, 'wrong mod at end:%s'
                               % self.mytank.get_mod_for_given_end(30))

    def test_end_at_depth(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_end_for_given_depth(40),
                               8.70562703148, 5, 'wrong end at depth:%s'
                               % self.mytank.get_end_for_given_depth(40))
开发者ID:ThomasChiroux,项目名称:dipplanner,代码行数:30,代码来源:tank_test.py

示例10: TestTankisTrimix870_2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisTrimix870_2(TestTank):
    """Test Tx8/70 Tank 2."""

    def setUp(self):
        """Init of the tests."""
        super().setUp()

        self.mytank = Tank(f_o2=0.08, f_he=0.7, max_ppo2=1.4)

    def test_name(self):
        """Check Name."""
        assert str(self.mytank) == 'Trimix 8/70'

    def test_mod(self):
        """Check Calculated mod."""
        assert self.mytank.mod == 165

    def test_min_od(self):
        """Check Calculated minimum od."""
        assert self.mytank.get_min_od() == 10

    def test_mod_at_end(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_mod_for_given_end(30),
                               79.0122229175, 5, 'wrong mod at end:%s'
                               % self.mytank.get_mod_for_given_end(30))

    def test_end_at_depth(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_end_for_given_depth(40),
                               12.4620912698, 5, 'wrong end at depth:%s'
                               % self.mytank.get_end_for_given_depth(40))
开发者ID:ThomasChiroux,项目名称:dipplanner,代码行数:34,代码来源:tank_test.py

示例11: TestTankisTrimix2030_2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisTrimix2030_2(TestTank):
    """Test Tx2030 Tank 2."""

    def setUp(self):
        """Init of the tests."""
        super().setUp()

        self.mytank = Tank(f_o2=0.2, f_he=0.3, max_ppo2=1.4)

    def test_name(self):
        """Check Name."""
        assert str(self.mytank) == 'Trimix 20/30'

    def test_mod(self):
        """Check Calculated mod."""
        assert self.mytank.mod == 59

    def test_mod_at_end(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_mod_for_given_end(30),
                               43.3498554235, 5, 'wrong mod at end:%s'
                               % self.mytank.get_mod_for_given_end(30))

    def test_end_at_depth(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_end_for_given_depth(40),
                               27.4879482229, 5, 'wrong end at depth:%s'
                               % self.mytank.get_end_for_given_depth(40))
开发者ID:ThomasChiroux,项目名称:dipplanner,代码行数:30,代码来源:tank_test.py

示例12: TestTankisAir2

# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_end_for_given_depth [as 别名]
class TestTankisAir2(TestTank):
    """Test Air Tank 2."""

    def setUp(self):
        """Init of the tests."""
        super().setUp()

        self.mytank = Tank(max_ppo2=1.4)

    def test_name(self):
        """Check Name."""
        assert str(self.mytank) == 'Air'

    def test_mod(self):
        """Check Calculated mod."""
        assert self.mytank.mod == 56

    def test_mod_at_end(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_mod_for_given_end(30),
                               31.0195918624, 5, 'wrong mod at end:%s'
                               % self.mytank.get_mod_for_given_end(30))

    def test_end_at_depth(self):
        """Check Calculated mod at given end."""
        self.assertAlmostEqual(self.mytank.get_end_for_given_depth(40),
                               38.7573409377, 5, 'wrong end at depth:%s'
                               % self.mytank.get_end_for_given_depth(40))
开发者ID:ThomasChiroux,项目名称:dipplanner,代码行数:30,代码来源:tank_test.py


注:本文中的dipplanner.tank.Tank.get_end_for_given_depth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。