patman: Switch over to asyncio
Now that all the pieces are in place, switch over from using an executor
to using asyncio.
While we are here, import defaultdict to avoid needing to specify its
module.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 47fbbe0..eee20b9 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -789,7 +789,7 @@
"""Test Patchwork patches not matching the series"""
pwork = patchwork.Patchwork.for_testing(self._fake_patchwork)
with terminal.capture() as (_, err):
- patches = status.collect_patches(1234, pwork)
+ patches = asyncio.run(status.check_status(1234, pwork))
status.check_patch_count(0, len(patches))
self.assertIn('Warning: Patchwork reports 1 patches, series has 0',
err.getvalue())
@@ -797,7 +797,7 @@
def test_status_read_patch(self):
"""Test handling a single patch in Patchwork"""
pwork = patchwork.Patchwork.for_testing(self._fake_patchwork)
- patches = status.collect_patches(1234, pwork)
+ patches = asyncio.run(status.check_status(1234, pwork))
self.assertEqual(1, len(patches))
patch = patches[0]
self.assertEqual('1', patch.id)