def test_free_recoil_energy_for_high_powered_rifle_no_decimals(): expect = 13 result = ex.approximate_free_recoil_energy(firearm_code='HPR', firearm_weight_in_lbs=6, ejecta_weight_in_grains=170, charge_weight_in_grains=30, muzzle_velocity_in_fps=2200) assert (expect == result)
def test_free_recoil_energy_for_average_length_shotgun_no_decimals(): expect = 30 result = ex.approximate_free_recoil_energy(firearm_code='ALS', firearm_weight_in_lbs=7.00, ejecta_weight_in_grains=589.9, charge_weight_in_grains=33.4, muzzle_velocity_in_fps=1275) assert (expect == result)
def test_free_recoil_energy_no_firearm_code_02(): expect = 16.49 result = ex.approximate_free_recoil_energy(firearm_weight_in_lbs=8, ejecta_weight_in_grains=140, muzzle_velocity_in_fps=3000, charge_weight_in_grains=45, decimal_places=2) assert (expect == result)
def test_free_recoil_energy_no_firearm_code_01(): expect = 12.69 result = ex.approximate_free_recoil_energy(firearm_weight_in_lbs=6, ejecta_weight_in_grains=150, charge_weight_in_grains=35, muzzle_velocity_in_fps=2100, decimal_places=2) assert (expect == result)
def test_free_recoil_recoil_energy_no_decimal_matches_chuck_hawks_270_win(): expect = 17 result = ex.approximate_free_recoil_energy(firearm_code='HPR', firearm_weight_in_lbs=8, ejecta_weight_in_grains=140, charge_weight_in_grains=45, muzzle_velocity_in_fps=3000) assert (expect == result)
def test_free_recoil_energy_one_decimal_matches_chuck_hawks_6mm_rem(): expect = 10.0 result = ex.approximate_free_recoil_energy(firearm_code='HPR', firearm_weight_in_lbs=8, ejecta_weight_in_grains=100, charge_weight_in_grains=35.5, muzzle_velocity_in_fps=3100, decimal_places=1) assert (expect == result)
def test_free_recoil_energy_for_high_powered_rifle_three_decimals(): expect = 12.6671 result = ex.approximate_free_recoil_energy(firearm_code='HPR', firearm_weight_in_lbs=6.0, ejecta_weight_in_grains=170.0, charge_weight_in_grains=30.0, muzzle_velocity_in_fps=2200, decimal_places=4) assert (expect == result)