-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix assert_called_once usage in resample tests #2648
Fix assert_called_once usage in resample tests #2648
Conversation
ArrayBolt3
commented
Nov 24, 2023
- Closes satpy/tests/scene_tests/test_resampling.py is using called_once in assertions rather than assert_called_once, causing test failures on Python 3.12 #2646
Thanks @ArrayBolt3! I just made a commit to your branch that calls the https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_called_once Let's see if the tests pass! |
@djhoese lol, you probably couldn't tell I'm not great with python :P hrm... test results seem bad though... |
Ah I think these tests failures are unrelated and being fixed by @pnuu in another PR. |
Ok so the Lines 921 to 938 in f2f1b33
which clearly does a check if it has called the method with the particular area before. The calls from the error message:
I expect the first 2 as they are an area definition of size 3x3 and then a "high resolution" version of that area of size 6x6. As far as I can tell the 3rd one should not result in a call as it should be equivalent to the first 3x3 area. |
Nevermind, no, the 3 calls to |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2648 +/- ##
=======================================
Coverage 95.21% 95.21%
=======================================
Files 356 356
Lines 51588 51590 +2
=======================================
+ Hits 49117 49119 +2
Misses 2471 2471
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for identifying this issue and getting things started. Sorry I took over and didn't really work with you on it, but I started getting confused by what the tests were expecting so I had to keep iterating on it so it made sense to me before I was comfortable merging. Thanks again. |
Thanks for your work! And I don't mind you "taking over" at all - I'm just trying to help maintain the package in Ubuntu and noticed this causing a build faliure. You're far more equipped to be able to fix this sort of thing than I am. :) |