As Sarah discussed with Khushboo on slack (pgadminhackers.slack.com for those who would like to join) yesterday, these errors seem to occur only on her Ubuntu system. We have not replicated them on Mac. But they exist before this patch, also.
We notice that copy/paste functionality is being tested in two feature tests, the query_tool_journey_test.py and copy_selected_query_results_feature_test.py. Perhaps we only need to test this behavior in one of the tests? We've confirmed that the patch is able to be applied against the current state of master without any changes after yesterday's commits. Thanks, Wenlin and Matt