Closed JamieMcMillan closed 7 months ago
Simply running pytest
achieves the desired result :)
Although there are a handful of failing tests present:
====================================================================================== test session starts ======================================================================================
platform darwin -- Python 3.11.6, pytest-7.4.4, pluggy-1.3.0
rootdir: /Users/jamiemcmillan/Documents/Development/comet_maths
plugins: typeguard-3.0.2
collected 28 items
comet_maths/interpolation/tests/test_interpolation.py FF.FF [ 17%]
comet_maths/linear_algebra/tests/test_matrix_calculation.py F. [ 25%]
comet_maths/linear_algebra/tests/test_matrix_conversion.py .......... [ 60%]
comet_maths/random/tests/test_generate_sample.py ......... [ 92%]
tests/test_sample.py .s [100%]
==================================================================================== short test summary info ====================================================================================
FAILED comet_maths/interpolation/tests/test_interpolation.py::TestInterpolation::test_extrapolation - ValueError: operands could not be broadcast together with shapes (175,) (50,)
FAILED comet_maths/interpolation/tests/test_interpolation.py::TestInterpolation::test_gaussian_process_regression - ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
FAILED comet_maths/interpolation/tests/test_interpolation.py::TestInterpolation::test_interpolation_1d_along_example - ValueError: operands could not be broadcast together with shapes (250,) (84,)
FAILED comet_maths/interpolation/tests/test_interpolation.py::TestInterpolation::test_interpolation_1d_along_example_unc - ValueError: operands could not be broadcast together with shapes (120,) (34,)
FAILED comet_maths/linear_algebra/tests/test_matrix_calculation.py::TestMatrixCalculation::test_calculate_corr - ValueError: invalid literal for int() with base 10: ''
===================================================================== 5 failed, 22 passed, 1 skipped, 21 warnings in 19.92s =====================================================================
In terms of adding to the CI/CD, this could be achieved using GitHub actions.
Closing.
Afternoon,
How does one run the test suite? Can this be added to the CI/CD flow through GitHub actions?
Jamie