From 6e0cea3e3fc1e874483d9df09ac0cd718ee2c639 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:21:48 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_discrete.py | 3 ++- tests/test_lognormal.py | 2 ++ tests/test_power.py | 2 ++ tests/test_tools.py | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_discrete.py b/tests/test_discrete.py index 66e6bc3..9d99dab 100644 --- a/tests/test_discrete.py +++ b/tests/test_discrete.py @@ -2,11 +2,12 @@ import numpy as np from functools import partial -from powerbox import LogNormalPowerBox, PowerBox, get_power +from powerbox import LogNormalPowerBox, PowerBox, get_power get_power = partial(get_power, bins_upto_boxlen=True) + def test_discrete_power_gaussian(): pb = PowerBox( N=512, diff --git a/tests/test_lognormal.py b/tests/test_lognormal.py index 53b9b99..939e5b9 100644 --- a/tests/test_lognormal.py +++ b/tests/test_lognormal.py @@ -1,9 +1,11 @@ import numpy as np from functools import partial + from powerbox import LogNormalPowerBox, PowerBox, get_power get_power = partial(get_power, bins_upto_boxlen=True) + def test_ln_vs_straight(): # Set up two boxes with exactly the same parameters pb = PowerBox(128, lambda u: 100.0 * u**-2.0, dim=3, seed=1234, boxlength=100.0) diff --git a/tests/test_power.py b/tests/test_power.py index 2174b5b..0fcaba4 100644 --- a/tests/test_power.py +++ b/tests/test_power.py @@ -1,10 +1,12 @@ import numpy as np import warnings from functools import partial + from powerbox import PowerBox, get_power, ignore_zero_absk, ignore_zero_ki, power2delta get_power = partial(get_power, bins_upto_boxlen=True) + def test_power1d(): p = [0] * 40 for i in range(40): diff --git a/tests/test_tools.py b/tests/test_tools.py index 9edf01f..0272881 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -19,6 +19,7 @@ angular_average = partial(angular_average, bins_upto_boxlen=True) angular_average_nd = partial(angular_average_nd, bins_upto_boxlen=True) + def test_warn_interp_weights(): x = np.linspace(-3, 3, 400) X, Y = np.meshgrid(x, x)