From 9d142891d9df2c3324407e319bffe583ac06187f Mon Sep 17 00:00:00 2001 From: KentWheeler <48744654+KentWheeler@users.noreply.github.com> Date: Wed, 10 Aug 2022 10:05:17 +0800 Subject: [PATCH 1/3] Update test_survey.py Added test for mets_partial_differentials --- geodepy/tests/test_survey.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/geodepy/tests/test_survey.py b/geodepy/tests/test_survey.py index 4e55c8c..9bc9b53 100644 --- a/geodepy/tests/test_survey.py +++ b/geodepy/tests/test_survey.py @@ -25,6 +25,22 @@ def test_first_vel_corrn(self): obs_pressure, obs_relative_humidity) corrected_obs_distance = raw_obs_distance + correction self.assertEqual(round(corrected_obs_distance, 4), 1117.8624) + + def test_mets_partial_differentials(self): + group_ref_Index = 1.00028 + temp = 15 + pressure = 1013.25 + rel_humidity = 60 + K = round(0.91973804217265260,2) + L = round(0.2619533756724471,2) + M = round(0.03911157383307305,1) + differ_new = mets_partial_differentials(group_ref_Index, + temp, + pressure, + rel_humidity) + self.assertEqual(round(differ_new[0], 2), K) + self.assertEqual(round(differ_new[1], 2), L) + self.assertEqual(round(differ_new[2], 1), M) def test_va_conv(self): test1 = va_conv(92.24305555555556, 2116.254) From 373f1a6cb1434f245e221b5ec69c609304507774 Mon Sep 17 00:00:00 2001 From: KentWheeler <48744654+KentWheeler@users.noreply.github.com> Date: Thu, 11 Aug 2022 09:46:41 +0800 Subject: [PATCH 2/3] Update test_survey.py --- geodepy/tests/test_survey.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geodepy/tests/test_survey.py b/geodepy/tests/test_survey.py index 9bc9b53..9039548 100644 --- a/geodepy/tests/test_survey.py +++ b/geodepy/tests/test_survey.py @@ -33,14 +33,14 @@ def test_mets_partial_differentials(self): rel_humidity = 60 K = round(0.91973804217265260,2) L = round(0.2619533756724471,2) - M = round(0.03911157383307305,1) + M = round(0.03911157383307305,2) differ_new = mets_partial_differentials(group_ref_Index, temp, pressure, rel_humidity) self.assertEqual(round(differ_new[0], 2), K) self.assertEqual(round(differ_new[1], 2), L) - self.assertEqual(round(differ_new[2], 1), M) + self.assertEqual(round(differ_new[2], 2), M) def test_va_conv(self): test1 = va_conv(92.24305555555556, 2116.254) From 952179caaff8e31139847892b1d9dbf10e171a20 Mon Sep 17 00:00:00 2001 From: KentWheeler <48744654+KentWheeler@users.noreply.github.com> Date: Thu, 11 Aug 2022 11:13:22 +0800 Subject: [PATCH 3/3] Update test_survey.py --- geodepy/tests/test_survey.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geodepy/tests/test_survey.py b/geodepy/tests/test_survey.py index 9039548..f129c3e 100644 --- a/geodepy/tests/test_survey.py +++ b/geodepy/tests/test_survey.py @@ -1,8 +1,8 @@ import unittest from geodepy.convert import DMSAngle -from geodepy.survey import (first_vel_params, first_vel_corrn, - precise_inst_ht, va_conv, radiations, joins) - +from geodepy.survey import (first_vel_params, first_vel_corrn, + mets_partial_differentials, precise_inst_ht, + va_conv, radiations, joins) class TestSurveyConvert(unittest.TestCase): def test_first_vel_params(self):