def test_gaymard(phid, phin): p = porosity(phid=phid, phin=phin, method="gaymard") assert any(p >= 0) and any(p <= 1) # -------------------------------------------------------------------------------------------------------------- # # unique_density_value = [] # rhob = 2.60 # rhom = 1.10 # rhof = 1.10 # unique_density_value.append((rhob, rhom, rhof)) # @pytest.mark.parametrize("rhob, rhom, rhof", unique_density_value) # def test_unique_density(rhob, rhom, rhof): # p = porosity(rhob = 2.60, rhom = 1.10, rhof = 1.10, # method = "density") # assert any(p >= 0) and any(p <= 1) # # -------------------------------------------------------------------------------------------------------------- # # unique_sonic_value = [] # dt = 75.0 # dtma = 100.0 # dtf = 100.0 # unique_sonic_value.append((dt, dtma, dtf)) # @pytest.mark.parametrize("dt, dtma, dtf", unique_sonic_value) # def test_unique_sonic(dt, dtma, dtf): # p = porosity(dt = 75.0, dtma = 100.0, dtf = 100.0, # method = "sonic") # assert any(p >= 0) and any(p <= 1) # # TODO: pytest for the rest of porosity
def test_neutron(): assert round(porosity(nphi=0.18, vsh=0.30, nphi_sh=0.27, method="neutron"),2) == 0.10 #TODO: pytest for the rest of porosity
def test_density(): assert round(porosity(rhob=2.43, rhom=2.65, rhof=1.10, method="density"),2) == 0.14
def test_sonic(dt, dtma, dtf): p = porosity(dt=dt, dtma=dtma, dtf=dtf, method="sonic") assert any(p >= 0) and any(p <= 1)
def test_neutron_density_squared(phid, phin): p = porosity(phid=phid, phin=phin, squared=True, method="neutron-density") assert any(p >= 0) and any(p <= 1)
def test_neutron(nphi, vsh, nphi_sh): p = porosity(nphi=nphi, vsh=vsh, nphi_sh=nphi_sh, method="neutron") assert any(p >= 0) and any(p <= 1)
def test_density(rhob, rhom, rhof): p = porosity(rhob=rhob, rhom=rhom, rhof=rhof, method="density") assert any(p >= 0) and any(p <= 1)