[master 1/1] Use len() to compare for duplicates which works reliably under Python3, instead of converting to set and comparing with a list. Closes #154

atodorov installerbot-noreply at redhat.com
Wed Jun 10 20:32:25 UTC 2015


From: Alexander Todorov <atodorov at redhat.com>

---
 tests/devices_test/device_packages_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/devices_test/device_packages_test.py b/tests/devices_test/device_packages_test.py
index 3e3863f..c613800 100644
--- a/tests/devices_test/device_packages_test.py
+++ b/tests/devices_test/device_packages_test.py
@@ -20,7 +20,7 @@ def testPackages(self):
         packages = luks.packages
 
         # no duplicates in list of packages
-        self.assertListEqual(packages, list(set(packages)))
+        self.assertEqual(len(packages), len(set(packages)))
 
         # several packages that ought to be included are
         for package in dev1.packages + dev2.packages + dev.packages:


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/46ead413a61be3e5fa8cb5d097973c15bdc3e339


More information about the anaconda-patches mailing list