Skip to content

Commit

Permalink
Fix test cases for multiprocess/python veresion compatibility.
Browse files Browse the repository at this point in the history
dict.values() can't be pickled - it must be converted to a list.
  • Loading branch information
mtwebster committed Dec 5, 2024
1 parent 2b678a8 commit 4cad1fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usr/lib/linuxmint/mintUpdate/mintUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2164,15 +2164,15 @@ def handle_apt_check_test(self, queue):
# Simulate an update of mintupdate itself.
check = checkAPT.APTCheck()
self.dummy_update(check, "mintupdate", False)
queue.put([None, check.updates.values()])
queue.put([None, list(check.updates.values())])
elif test_mode == "updates":
# Simulate some normal updates
check = checkAPT.APTCheck()
self.dummy_update(check, "python3", False)
self.dummy_update(check, "mint-meta-core", False)
self.dummy_update(check, "linux-generic", True)
self.dummy_update(check, "xreader", False)
queue.put([None, check.updates.values()])
queue.put([None, list(check.updates.values())])
elif test_mode == "tracker-max-age":
# Simulate the UpdateTracker notifying about updates.
check = checkAPT.APTCheck()
Expand All @@ -2194,7 +2194,7 @@ def handle_apt_check_test(self, queue):
with open(os.path.join(CONFIG_PATH, "updates.json"), "w") as f:
json.dump(root_json, f)

queue.put([None, check.updates.values()])
queue.put([None, list(check.updates.values())])

return True
# ---------------- Testing ------------------------------------------#
Expand Down

0 comments on commit 4cad1fe

Please sign in to comment.