From 56609cd124aabe664e78aa679c8dfcdbe10224b2 Mon Sep 17 00:00:00 2001 From: jsh9 <25124332+jsh9@users.noreply.github.com> Date: Sun, 8 Jan 2023 17:45:28 -0800 Subject: [PATCH] Fix broken unit test cases due to rho formula change --- tests/files/HH_G_FKSH14.txt | 12 ++++++------ tests/test_helper_hh_calibration.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/files/HH_G_FKSH14.txt b/tests/files/HH_G_FKSH14.txt index b9028c10..2901bb32 100644 --- a/tests/files/HH_G_FKSH14.txt +++ b/tests/files/HH_G_FKSH14.txt @@ -1,9 +1,9 @@ -0.00052396 0.000226929 0.000440667 0.000110308 0.000101161 +5.23960135e-04 1.86499079e-03 1.01160864e-04 1.04122326e-04 1.10307874e-04 100 100 100 100 100 -0.000309816 0.00044554 0.000602407 0.000825617 0.000926138 +3.09816027e-04 4.47737604e-04 6.14144703e-04 8.43769672e-04 9.46402838e-04 1 1 1 1 1 0.919 0.919 0.919 0.919 0.919 -2.376e+07 6.70488e+07 1.39674e+08 2.2376e+09 3.10298e+09 -0.219786 0.206411 0.26511 1 1 -27135.1 65213.2 147459 785749 1.08605e+06 -0.901558 0.843668 0.865377 0.981156 0.981156 +2.37600000e+07 7.06355469e+07 1.54303879e+08 2.43121793e+09 3.37702221e+09 +2.19786132e-01 1.99041870e-01 2.49332391e-01 1 1 +2.71351174e+04 6.56456237e+04 1.49957507e+05 8.32908454e+05 1.15089302e+06 +9.01557789e-01 9.01557789e-01 8.58140704e-01 9.81155779e-01 9.77537688e-01 diff --git a/tests/test_helper_hh_calibration.py b/tests/test_helper_hh_calibration.py index a72cfd69..9e5c46d8 100644 --- a/tests/test_helper_hh_calibration.py +++ b/tests/test_helper_hh_calibration.py @@ -15,8 +15,8 @@ def test_calc_rho(self): h = np.array([2, 3, 4, 5]) Vs = np.array([200, 300, 400, 500]) rho = hhc._calc_rho(h, Vs) - rho_ = np.array([1.6500, 2.0375, 1.9892, 1.9995]) * 1000 - self.assertTrue(np.allclose(rho, rho_, rtol=0.001, atol=0.0)) + expected_rho = np.array([1.6500, 2.1272, 2.1399, 2.1702]) * 1000 + self.assertTrue(np.allclose(rho, expected_rho, rtol=0.001, atol=0.0)) def test_calc_Gmax(self): rho = np.array([1600, 1700, 1800])