示例#1
0
def test_approximate_recoil_impulse_generic_03():
    expect = 2.18  # lbs sec
    result = ex.approximate_recoil_impulse(ejecta_weight_in_grains=150,
                                           muzzle_velocity_in_fps=2100,
                                           charge_weight_in_grains=35,
                                           decimal_places=2)
    assert (expect == result)
示例#2
0
def test_approximate_recoil_impulse_generic_two_decimals_02():
    expect = 3.66  # lbs sec
    result = ex.approximate_recoil_impulse(ejecta_weight_in_grains=200,
                                           muzzle_velocity_in_fps=3000,
                                           charge_weight_in_grains=45,
                                           decimal_places=2)
    assert (expect == result)
示例#3
0
def test_approximate_recoil_impulse_with_firearm_code_03():
    expect = 1.97  # lbs sec
    result = ex.approximate_recoil_impulse(ejecta_weight_in_grains=150,
                                           muzzle_velocity_in_fps=2100,
                                           charge_weight_in_grains=35,
                                           firearm_code='HPR',
                                           decimal_places=2)
    assert (expect == result)
示例#4
0
def test_approximate_recoil_impulse_with_firearm_code_two_decimals_02():
    expect = 3.71  # lbs sec
    result = ex.approximate_recoil_impulse(ejecta_weight_in_grains=200,
                                           muzzle_velocity_in_fps=3000,
                                           charge_weight_in_grains=45,
                                           firearm_code='HPR',
                                           decimal_places=2)
    assert (expect == result)
示例#5
0
def test_approximate_recoil_impulse_generic_no_decimals_01():
    expect = 2  # lbs sec
    result = ex.approximate_recoil_impulse(ejecta_weight_in_grains=100,
                                           muzzle_velocity_in_fps=3000,
                                           charge_weight_in_grains=45)
    assert (expect == result)