diff --git a/tests/unit/canopy_model/test_canopy.py b/tests/unit/canopy_model/test_canopy.py new file mode 100644 index 00000000..98e6d1be --- /dev/null +++ b/tests/unit/canopy_model/test_canopy.py @@ -0,0 +1 @@ +"""test the canopy object in canopy.py initialises as expected.""" diff --git a/tests/unit/canopy_model/test_canopy_functions.py b/tests/unit/canopy_model/test_canopy_functions.py new file mode 100644 index 00000000..dd3be6ef --- /dev/null +++ b/tests/unit/canopy_model/test_canopy_functions.py @@ -0,0 +1 @@ +"""test the functions in canopy_functions.py.""" diff --git a/tests/unit/canopy_model/test_community.py b/tests/unit/canopy_model/test_community.py new file mode 100644 index 00000000..07e8eb35 --- /dev/null +++ b/tests/unit/canopy_model/test_community.py @@ -0,0 +1 @@ +"""test the community object in community.py initialises as expected.""" diff --git a/tests/unit/canopy_model/test_jaideeps_t_model_extension.py b/tests/unit/canopy_model/test_jaideeps_t_model_extension_functions.py similarity index 50% rename from tests/unit/canopy_model/test_jaideeps_t_model_extension.py rename to tests/unit/canopy_model/test_jaideeps_t_model_extension_functions.py index d743e90f..e1d4179c 100644 --- a/tests/unit/canopy_model/test_jaideeps_t_model_extension.py +++ b/tests/unit/canopy_model/test_jaideeps_t_model_extension_functions.py @@ -1,10 +1,19 @@ +"""Test the functions in jaideeps_t_model_extension_functions.py.""" + import numpy as np from numpy.testing import assert_array_equal -from pyrealm.canopy_model.functions.jaideep_t_model_extension_functions import * +from pyrealm.canopy_model.functions.jaideep_t_model_extension_functions import ( + calculate_q_m_values, +) def test_calculate_q_m_values_returns_q_m_for_valid_input(): + """Test happy path for calculating q_m. + + test that values of q_m are calculated correctly when valid arguments are + provided to the function. + """ m_values = np.array([2, 3]) n_values = np.array([5, 4]) expected_q_m_values = np.array([2.9038988210485766, 2.3953681843215673]) @@ -13,20 +22,31 @@ def test_calculate_q_m_values_returns_q_m_for_valid_input(): def test_calculate_q_m_values_raises_exception_for_invalid_input(): + """Test unhappy path for calculating q_m. + + Test that an exception is raised when invalid arguments are provided to the + function. + """ + pass -def test_calculate_z_m_values(): +def test_calculate_z_max_values(): + """Test happy path for calculating z_max.""" + pass def test_calculate_r_0_values(): + """Test happy path for calculating r_0.""" pass def test_calculate_projected_canopy_area_for_individuals(): + """Test happy path for calculating canopy area for individuals.""" pass def test_calculate_relative_canopy_radii(): + """Test happy path for calculating relative canopy radii for individuals.""" pass diff --git a/tests/unit/tmodel/test_t_model_functions.py b/tests/unit/tmodel/test_t_model_functions.py new file mode 100644 index 00000000..54a5c41e --- /dev/null +++ b/tests/unit/tmodel/test_t_model_functions.py @@ -0,0 +1 @@ +"""test the functions in t_model_functions.py."""