-
Notifications
You must be signed in to change notification settings - Fork 20
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 suggestions from CodeQL scan #317
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
=======================================
Coverage 98.86% 98.87%
=======================================
Files 55 55
Lines 2210 2218 +8
=======================================
+ Hits 2185 2193 +8
Misses 25 25 ☔ View full report in Codecov by Sentry. |
c285b36
to
68c8b44
Compare
|
||
def test_eq_async_cache_map(self): | ||
test_static_map = StaticMapping(**self.test_data) | ||
self.assertTrue(self.static_map == test_static_map) |
Check notice
Code scanning / CodeQL
Imprecise assert Note test
self.assertTrue(self.static_map == test_static_map) | ||
|
||
# Test the opposite | ||
self.assertFalse(self.static_map != test_static_map) |
Check notice
Code scanning / CodeQL
Imprecise assert Note test
|
||
# Change the data dictionary | ||
test_static_map = StaticMapping(test=123) | ||
self.assertFalse(self.static_map == test_static_map) |
Check notice
Code scanning / CodeQL
Imprecise assert Note test
self.assertFalse(self.static_map == test_static_map) | ||
|
||
# Test different class | ||
self.assertFalse(self.static_map == self.test_data) |
Check notice
Code scanning / CodeQL
Imprecise assert Note test
|
||
# Make them equal again | ||
test_cache_map._last_update = self.async_cache_map._last_update | ||
self.assertTrue(self.async_cache_map == test_cache_map) |
Check notice
Code scanning / CodeQL
Imprecise assert Note test
self.assertTrue(self.async_cache_map == test_cache_map) | ||
|
||
# Test different class | ||
self.assertFalse(self.async_cache_map == self.test_data) |
Check notice
Code scanning / CodeQL
Imprecise assert Note test
8bf57b3
to
880c5e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍 Thanks for your work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
242e4c0
This pull request addresses all warnings from CodeQL scan. It fixes #268, fixes #269, fixes #270, fixes #271
__eq__
not overridden when adding attributes #269__eq__
not overridden when adding attributes #271