From 6c8fb66656bcf52adf9513d7d399779e2a2ae354 Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Mon, 16 Oct 2023 08:20:32 +0200 Subject: [PATCH] rename test files for pytest notation --- GPy/testing/{cython_tests.py => test_cython.py} | 0 ...p_likelihood_tests.py => test_ep_likelihood.py} | 0 .../{examples_tests.py => test_examples.py} | 0 GPy/testing/{gp_tests.py => test_gp.py} | 0 ...ce_tests.py => test_gpy_kernels_state_space.py} | 0 GPy/testing/{grid_tests.py => test_grid.py} | 0 .../{inference_tests.py => test_inference.py} | 0 GPy/testing/{kernel_tests.py => test_kernel.py} | 0 .../{likelihood_tests.py => test_likelihood.py} | 0 GPy/testing/{linalg_test.py => test_linalg.py} | 0 ...ink_function_tests.py => test_link_function.py} | 0 GPy/testing/{mapping_tests.py => test_mapping.py} | 0 .../{meanfunc_tests.py => test_meanfunc.py} | 0 .../{minibatch_tests.py => test_minibatch.py} | 0 GPy/testing/{misc_tests.py => test_misc.py} | 0 GPy/testing/{model_tests.py => test_model.py} | 0 GPy/testing/{mpi_tests.py => test_mpi.py} | 0 GPy/testing/{pep_tests.py => test_pep.py} | 0 GPy/testing/{pickle_tests.py => test_pickle.py} | 0 .../{plotting_tests.py => test_plotting.py} | 0 GPy/testing/{prior_tests.py => test_prior.py} | 0 .../{quadrature_tests.py => test_quadrature.py} | 0 ...ormation_tests.py => test_rv_transformation.py} | 0 ...erialization_tests.py => test_serialization.py} | 0 ...pace_main_tests.py => test_state_space_main.py} | 0 GPy/testing/{svgp_tests.py => test_svgp.py} | 0 GPy/testing/{tp_tests.py => test_tp.py} | 0 GPy/testing/{util_tests.py => test_util.py} | 0 .../{variational_tests.py => test_variational.py} | 0 GPy/testing/todo.md | 14 ++++++++++++++ 30 files changed, 14 insertions(+) rename GPy/testing/{cython_tests.py => test_cython.py} (100%) rename GPy/testing/{ep_likelihood_tests.py => test_ep_likelihood.py} (100%) rename GPy/testing/{examples_tests.py => test_examples.py} (100%) rename GPy/testing/{gp_tests.py => test_gp.py} (100%) rename GPy/testing/{gpy_kernels_state_space_tests.py => test_gpy_kernels_state_space.py} (100%) rename GPy/testing/{grid_tests.py => test_grid.py} (100%) rename GPy/testing/{inference_tests.py => test_inference.py} (100%) rename GPy/testing/{kernel_tests.py => test_kernel.py} (100%) rename GPy/testing/{likelihood_tests.py => test_likelihood.py} (100%) rename GPy/testing/{linalg_test.py => test_linalg.py} (100%) rename GPy/testing/{link_function_tests.py => test_link_function.py} (100%) rename GPy/testing/{mapping_tests.py => test_mapping.py} (100%) rename GPy/testing/{meanfunc_tests.py => test_meanfunc.py} (100%) rename GPy/testing/{minibatch_tests.py => test_minibatch.py} (100%) rename GPy/testing/{misc_tests.py => test_misc.py} (100%) rename GPy/testing/{model_tests.py => test_model.py} (100%) rename GPy/testing/{mpi_tests.py => test_mpi.py} (100%) rename GPy/testing/{pep_tests.py => test_pep.py} (100%) rename GPy/testing/{pickle_tests.py => test_pickle.py} (100%) rename GPy/testing/{plotting_tests.py => test_plotting.py} (100%) rename GPy/testing/{prior_tests.py => test_prior.py} (100%) rename GPy/testing/{quadrature_tests.py => test_quadrature.py} (100%) rename GPy/testing/{rv_transformation_tests.py => test_rv_transformation.py} (100%) rename GPy/testing/{serialization_tests.py => test_serialization.py} (100%) rename GPy/testing/{state_space_main_tests.py => test_state_space_main.py} (100%) rename GPy/testing/{svgp_tests.py => test_svgp.py} (100%) rename GPy/testing/{tp_tests.py => test_tp.py} (100%) rename GPy/testing/{util_tests.py => test_util.py} (100%) rename GPy/testing/{variational_tests.py => test_variational.py} (100%) create mode 100644 GPy/testing/todo.md diff --git a/GPy/testing/cython_tests.py b/GPy/testing/test_cython.py similarity index 100% rename from GPy/testing/cython_tests.py rename to GPy/testing/test_cython.py diff --git a/GPy/testing/ep_likelihood_tests.py b/GPy/testing/test_ep_likelihood.py similarity index 100% rename from GPy/testing/ep_likelihood_tests.py rename to GPy/testing/test_ep_likelihood.py diff --git a/GPy/testing/examples_tests.py b/GPy/testing/test_examples.py similarity index 100% rename from GPy/testing/examples_tests.py rename to GPy/testing/test_examples.py diff --git a/GPy/testing/gp_tests.py b/GPy/testing/test_gp.py similarity index 100% rename from GPy/testing/gp_tests.py rename to GPy/testing/test_gp.py diff --git a/GPy/testing/gpy_kernels_state_space_tests.py b/GPy/testing/test_gpy_kernels_state_space.py similarity index 100% rename from GPy/testing/gpy_kernels_state_space_tests.py rename to GPy/testing/test_gpy_kernels_state_space.py diff --git a/GPy/testing/grid_tests.py b/GPy/testing/test_grid.py similarity index 100% rename from GPy/testing/grid_tests.py rename to GPy/testing/test_grid.py diff --git a/GPy/testing/inference_tests.py b/GPy/testing/test_inference.py similarity index 100% rename from GPy/testing/inference_tests.py rename to GPy/testing/test_inference.py diff --git a/GPy/testing/kernel_tests.py b/GPy/testing/test_kernel.py similarity index 100% rename from GPy/testing/kernel_tests.py rename to GPy/testing/test_kernel.py diff --git a/GPy/testing/likelihood_tests.py b/GPy/testing/test_likelihood.py similarity index 100% rename from GPy/testing/likelihood_tests.py rename to GPy/testing/test_likelihood.py diff --git a/GPy/testing/linalg_test.py b/GPy/testing/test_linalg.py similarity index 100% rename from GPy/testing/linalg_test.py rename to GPy/testing/test_linalg.py diff --git a/GPy/testing/link_function_tests.py b/GPy/testing/test_link_function.py similarity index 100% rename from GPy/testing/link_function_tests.py rename to GPy/testing/test_link_function.py diff --git a/GPy/testing/mapping_tests.py b/GPy/testing/test_mapping.py similarity index 100% rename from GPy/testing/mapping_tests.py rename to GPy/testing/test_mapping.py diff --git a/GPy/testing/meanfunc_tests.py b/GPy/testing/test_meanfunc.py similarity index 100% rename from GPy/testing/meanfunc_tests.py rename to GPy/testing/test_meanfunc.py diff --git a/GPy/testing/minibatch_tests.py b/GPy/testing/test_minibatch.py similarity index 100% rename from GPy/testing/minibatch_tests.py rename to GPy/testing/test_minibatch.py diff --git a/GPy/testing/misc_tests.py b/GPy/testing/test_misc.py similarity index 100% rename from GPy/testing/misc_tests.py rename to GPy/testing/test_misc.py diff --git a/GPy/testing/model_tests.py b/GPy/testing/test_model.py similarity index 100% rename from GPy/testing/model_tests.py rename to GPy/testing/test_model.py diff --git a/GPy/testing/mpi_tests.py b/GPy/testing/test_mpi.py similarity index 100% rename from GPy/testing/mpi_tests.py rename to GPy/testing/test_mpi.py diff --git a/GPy/testing/pep_tests.py b/GPy/testing/test_pep.py similarity index 100% rename from GPy/testing/pep_tests.py rename to GPy/testing/test_pep.py diff --git a/GPy/testing/pickle_tests.py b/GPy/testing/test_pickle.py similarity index 100% rename from GPy/testing/pickle_tests.py rename to GPy/testing/test_pickle.py diff --git a/GPy/testing/plotting_tests.py b/GPy/testing/test_plotting.py similarity index 100% rename from GPy/testing/plotting_tests.py rename to GPy/testing/test_plotting.py diff --git a/GPy/testing/prior_tests.py b/GPy/testing/test_prior.py similarity index 100% rename from GPy/testing/prior_tests.py rename to GPy/testing/test_prior.py diff --git a/GPy/testing/quadrature_tests.py b/GPy/testing/test_quadrature.py similarity index 100% rename from GPy/testing/quadrature_tests.py rename to GPy/testing/test_quadrature.py diff --git a/GPy/testing/rv_transformation_tests.py b/GPy/testing/test_rv_transformation.py similarity index 100% rename from GPy/testing/rv_transformation_tests.py rename to GPy/testing/test_rv_transformation.py diff --git a/GPy/testing/serialization_tests.py b/GPy/testing/test_serialization.py similarity index 100% rename from GPy/testing/serialization_tests.py rename to GPy/testing/test_serialization.py diff --git a/GPy/testing/state_space_main_tests.py b/GPy/testing/test_state_space_main.py similarity index 100% rename from GPy/testing/state_space_main_tests.py rename to GPy/testing/test_state_space_main.py diff --git a/GPy/testing/svgp_tests.py b/GPy/testing/test_svgp.py similarity index 100% rename from GPy/testing/svgp_tests.py rename to GPy/testing/test_svgp.py diff --git a/GPy/testing/tp_tests.py b/GPy/testing/test_tp.py similarity index 100% rename from GPy/testing/tp_tests.py rename to GPy/testing/test_tp.py diff --git a/GPy/testing/util_tests.py b/GPy/testing/test_util.py similarity index 100% rename from GPy/testing/util_tests.py rename to GPy/testing/test_util.py diff --git a/GPy/testing/variational_tests.py b/GPy/testing/test_variational.py similarity index 100% rename from GPy/testing/variational_tests.py rename to GPy/testing/test_variational.py diff --git a/GPy/testing/todo.md b/GPy/testing/todo.md new file mode 100644 index 00000000..4a7833d7 --- /dev/null +++ b/GPy/testing/todo.md @@ -0,0 +1,14 @@ +As off now, I am once through all of the tests and basic migration is done. + +Now, fix the below things and todos before starting to get the tests running using pytest + + ++ update test script names according to pytest conversion ++ check for TODOs ++ + there are many associated with "iscloseto" functions from np.testing. Will have to figure out how these ++ + some tests are not that clear to me tbh ++ check nomenclature of test files and test classes and test functions ++ chatgpt says that I should replace delta with the decimal but a delta of 1e-4 should be decimal=4. Not sure about this yet but that is something I need to fix later on +--> this gives more content to it: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual +I need to write a custom function that behaves accordingly as in some cases, np.testing.assert_almost_equal won't be applicable, https://numpy.org/doc/stable/reference/generated/numpy.testing.assert_almost_equal.html +or how about this: `np.testing.assert_allclose(pcopy.param_array, par.param_array, atol=1e-6)` \ No newline at end of file