Exemplo n.º 1
0
 def test_adjust_speed_zero(self):
     p = CentrifPump("", 100, 12, 45, 300)
     p.adjust_speed(0)
     assert p.get_speed_str() == "The pump is stopped."
     assert p.get_flow_str() == "The pump output flow rate is 0.0 gpm."
     assert p.get_press_str() == "The pump pressure is 0.00 psi."
     assert p.get_power_str() == "The power usage for the pump is 0.00 kW."
Exemplo n.º 2
0
 def test_adjust_speed_expected(self):
     p = CentrifPump("",
                     flow_rate_out=75,
                     pump_head_in=3,
                     press_out=7.3,
                     pump_speed=1750)
     p.adjust_speed(500)
     assert p.get_speed_str() == "The pump is running at 500 rpm."
     assert p.get_flow_str(
     ) == "The pump output flow rate is 21.428571428571427 gpm."
     assert p.get_press_str() == "The pump pressure is 0.60 psi."
     assert p.get_power_str() == "The power usage for the pump is 0.01 kW."
Exemplo n.º 3
0
 def test_get_flowrate(self):
     p = CentrifPump(flow_rate_out=100.0)
     assert p.get_flow_str() == "The pump output flow rate is 100.0 gpm."