Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
itrharrison committed Sep 9, 2024
1 parent 4f189f6 commit 0bbd6d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions skypy/halos/tests/test_quenching.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_environment_quenched():
number_quenched = Counter(quenched)[True]

p_value = stats.binomtest(number_quenched, n=n, p=p,
alternative='two-sided').pvalue
alternative='two-sided').pvalue
assert p_value > 0.01


Expand All @@ -29,5 +29,5 @@ def test_mass_quenched():
number_quenched = Counter(quenched)[True]

p_value = stats.binomtest(number_quenched, n=n, p=0.5,
alternative='two-sided').pvalue
alternative='two-sided').pvalue
assert p_value > 0.01
12 changes: 6 additions & 6 deletions skypy/power_spectrum/tests/test_growth.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def test_growth():
Dzprime = growth_function_derivative(redshift, cosmology_flat)

# Test growth factor
assert redshift.shape == fz.shape,\
assert redshift.shape == fz.shape, \
"Length of redshift array and growth rate array do not match"
assert isclose(fz[0], 1.0),\
assert isclose(fz[0], 1.0), \
"Growth factor at redshift 0 is not close to 1.0"

# Test growth function
assert redshift.shape == Dz.shape,\
assert redshift.shape == Dz.shape, \
"Length of redshift array and growth function array do not match"
assert allclose(Dz, 1. / (1. + redshift)),\
assert allclose(Dz, 1. / (1. + redshift)), \
"Growth function is not close to the scale factor"

# make sure that growth_function with scalar returns scalar
Expand All @@ -74,9 +74,9 @@ def test_growth():
assert Dz2 == Dz[2], 'growth function with scalar produced inconsistent result'

# Test growth function derivative
assert redshift.shape == Dzprime.shape,\
assert redshift.shape == Dzprime.shape, \
"Length of redshift array and growth function array do not match"
assert isclose(Dzprime[0], -1.0),\
assert isclose(Dzprime[0], -1.0), \
"Derivative of growth function at redshift 0 is not close to -1.0"

# Test against precomputed values using Planck15 cosmology
Expand Down

0 comments on commit 0bbd6d5

Please sign in to comment.