Example #1
0
 def test_volumes_m3_to_ft3(self):
     assert pytest.approx(conv_unit(1, "m3", "ft3"), 1e-3) == 1 / 0.0283168
Example #2
0
 def test_volumes_m3_to_cm3(self):
     assert pytest.approx(conv_unit(1, "m3", "cm3"), 1e-3) == 100 ** 3
Example #3
0
 def test_volumes_L_to_m3(self):
     assert pytest.approx(conv_unit(1, "L", "m3"), 1e-3) == 1 / 1000
Example #4
0
 def test_pressures_psi_to_Pa(self):
     assert pytest.approx(conv_unit(1, "psi", "Pa"), 1e-3) == 6894.7572931783
Example #5
0
 def test_pressures_kPa_to_Pa(self):
     assert pytest.approx(conv_unit(1, "kPa", "Pa"), 1e-3) == 1e3
Example #6
0
 def test_pressures_atm_to_Pa(self):
     assert pytest.approx(conv_unit(1, "atm", "Pa"), 1e-3) == 101325
Example #7
0
 def test_pressures_Pa_to_psi(self):
     assert pytest.approx(conv_unit(1, "Pa", "psi"), 1e-3) == 1 / 6894.7572931783
Example #8
0
 def test_pressures_bar_to_Pa(self):
     assert pytest.approx(conv_unit(1, "bar", "Pa"), 1e-3) == 1e5
Example #9
0
 def test_pressures_Pa_to_atm(self):
     assert pytest.approx(conv_unit(1, "Pa", "atm"), 1e-3) == 1 / 101325
Example #10
0
 def test_temperatures_K_to_R(self):
     assert pytest.approx(conv_unit(300, "K", "ºR"), 1e-5) == 540
Example #11
0
 def test_temperatures_R_to_K(self):
     assert pytest.approx(conv_unit(540, "ºR", "K"), 1e-5) == 300
Example #12
0
 def test_temperatures_F_to_K(self):
     assert pytest.approx(conv_unit(80.33, "ºF", "K"), 1e-5) == 300
Example #13
0
 def test_temperatures_K_to_F(self):
     assert pytest.approx(conv_unit(300, "K", "ºF"), 1e-5) == 80.33
Example #14
0
 def test_temperatures_K_to_C(self):
     assert conv_unit(298.15, "K", "ºC") == 25
Example #15
0
 def test_temperatures_C_to_K(self):
     assert conv_unit(25, "ºC", "K") == 298.15
Example #16
0
 def test_temperatures_K_to_K(self):
     assert conv_unit(25, "K", "K") == 25