-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description
Trying to fix a warning rising when using pytest before it turns into an error. Specifically, the use of return instead of assert in two places in starfish/core/spots/FindSpots/test/test_spot_detection.py.
Solution is to use spots.count_total_spots() == ? and put a fixed number instead of '?'
Steps/Code to Reproduce
make fast-test
Expected Results
No warning is thrown.
Actual Results
starfish/core/spots/FindSpots/test/test_spot_detection.py::test_spot_detection_with_image_with_labeled_axes
/home/shachafl/Code/starfish/.venv3.9/lib/python3.9/site-packages/_pytest/python.py:163: PytestReturnNotNoneWarning: Expected None, but starfish/core/spots/FindSpots/test/test_spot_detection.py::test_spot_detection_with_image_with_labeled_axes returned <starfish.core.types._spot_finding_results.SpotFindingResults object at 0x7f6b3dd2dcd0>, which will be an error in a future version of pytest. Did you mean to use assert instead of return?
warnings.warn(
starfish/core/spots/FindSpots/test/test_spot_detection.py::test_reference_image_spot_detection_with_image_with_labeled_axes
/home/shachafl/Code/starfish/.venv3.9/lib/python3.9/site-packages/_pytest/python.py:163: PytestReturnNotNoneWarning: Expected None, but starfish/core/spots/FindSpots/test/test_spot_detection.py::test_reference_image_spot_detection_with_image_with_labeled_axes returned <starfish.core.types._spot_finding_results.SpotFindingResults object at 0x7f076f021af0>, which will be an error in a future version of pytest. Did you mean to use assert instead of return?
warnings.warn(