rhayes777 / PyAutoFit

PyAutoFit: Classy Probabilistic Programming
https://pyautofit.readthedocs.io/
MIT License
59 stars 11 forks source link

Reduce unit test noise #990

Closed Jammy2211 closed 4 months ago

Jammy2211 commented 5 months ago

After running unit tests, I still get a lot of noise, despite my PR (I guess this was introduced recently):

test_autofit/database/identifier/test_identifiers.py: 2 warnings
test_autofit/graphical/global/test_global.py: 1 warning
test_autofit/non_linear/test_analysis.py: 1 warning
test_autofit/non_linear/grid/test_optimizer_grid_search.py: 106 warnings
test_autofit/non_linear/grid/test_paths/test_aggregator.py: 5 warnings
test_autofit/non_linear/grid/test_paths/test_indicators.py: 5 warnings
test_autofit/non_linear/grid/test_sensitivity/test_functionality.py: 2 warnings
test_autofit/non_linear/grid/test_sensitivity/test_run.py: 8 warnings
  /mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/result.py:76: UserWarning: No member "__getstate__" contained Result.
    warnings.warn('No member "%s" contained Result.' % name)

test_autofit/non_linear/grid/test_optimizer_grid_search.py: 2 warnings
test_autofit/non_linear/grid/test_paths/test_aggregator.py: 5 warnings
test_autofit/non_linear/grid/test_paths/test_indicators.py: 1 warning
test_autofit/non_linear/grid/test_sensitivity/test_run.py: 9 warnings
  /mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/result.py:76: UserWarning: No member "__setstate__" contained Result.
    warnings.warn('No member "%s" contained Result.' % name)

test_autofit/non_linear/grid/test_optimizer_grid_search.py::TestGridSearchResult::test_best_model
  /mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/result.py:76: UserWarning: No member "best_sample" contained Result.
    warnings.warn('No member "%s" contained Result.' % name)

test_autofit/non_linear/grid/test_optimizer_grid_search.py::TestGridSearchResult::test__results_on_native_grid
  /mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/result.py:76: UserWarning: No member "__array_struct__" contained Result.
    warnings.warn('No member "%s" contained Result.' % name)

test_autofit/non_linear/grid/test_optimizer_grid_search.py::TestGridSearchResult::test__results_on_native_grid
  /mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/result.py:76: UserWarning: No member "__array_interface__" contained Result.
    warnings.warn('No member "%s" contained Result.' % name)

test_autofit/non_linear/grid/test_optimizer_grid_search.py::TestGridSearchResult::test__results_on_native_grid
  /mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/result.py:76: UserWarning: No member "__array__" contained Result.
    warnings.warn('No member "%s" contained Result.' % name)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Some of this may indicate that an interface was messed up a bit when we did a recent refactor.