This PR overhauls the unit tests to use np.testing.assert_allclose definition. We have been suffering hard to reproduce precision loss issues during multi-threaded unit tests and using np.testing.assert_allclose definition helps alleviate it, albeit in a disappointing way. With that said, np.testing.assert_allclose is recommended by Numpy over np.testing.assert_array_almost_equal thus this is a welcome switch.
Preflight
Code Style and Quality
[x] Unit tests have been implemented and passed.
[x] Pyright static checking has been run and passed.
[x] Pre-commit hooks have been run and passed.
[N/A] New transformations have been added to the Automatic Colour Conversion Graph.
[N/A] New transformations have been exported to the relevant namespaces, e.g. colour, colour.models.
Documentation
[N/A] New features are documented along with examples if relevant.
[N/A] The documentation is Sphinx and numpydoc compliant.
Summary
This PR overhauls the unit tests to use
np.testing.assert_allclose
definition. We have been suffering hard to reproduce precision loss issues during multi-threaded unit tests and usingnp.testing.assert_allclose
definition helps alleviate it, albeit in a disappointing way. With that said,np.testing.assert_allclose
is recommended by Numpy overnp.testing.assert_array_almost_equal
thus this is a welcome switch.Preflight
Code Style and Quality
colour
,colour.models
.Documentation