本文整理汇总了Python中dipplanner.tank.Tank.get_min_od方法的典型用法代码示例。如果您正苦于以下问题:Python Tank.get_min_od方法的具体用法?Python Tank.get_min_od怎么用?Python Tank.get_min_od使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dipplanner.tank.Tank
的用法示例。
在下文中一共展示了Tank.get_min_od方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestTankisTrimix870_2
# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_min_od [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),
)
示例2: TestTankisTrimix870_2
# 需要导入模块: from dipplanner.tank import Tank [as 别名]
# 或者: from dipplanner.tank.Tank import get_min_od [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))