[virt-tools-list] [PATCH virt-manager 02/14] test_urls: simplify the sorting

Marc Hartmayer mhartmay at linux.ibm.com
Tue Dec 18 13:44:51 UTC 2018


Signed-off-by: Marc Hartmayer <mhartmay at linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy at linux.ibm.com>
---
 tests/test_urls.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/test_urls.py b/tests/test_urls.py
index 82cd72f8121a..485b67a42dbb 100644
--- a/tests/test_urls.py
+++ b/tests/test_urls.py
@@ -276,10 +276,7 @@ def _make_tests():
                 vals.get("kernelregex", None))
         urls[d.name] = d
 
-    keys = list(urls.keys())
-    keys.sort()
-    for key in keys:
-        testdata = urls[key]
+    for key, testdata in sorted(urls.items()):
         def _make_wrapper(d):
             return lambda _self: _testURLWrapper(d)
         setattr(URLTests, "testURL%s" % key.replace("-", "_"),
-- 
2.17.0




More information about the virt-tools-list mailing list