[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:31:01 UTC 2015
From: Alexander Todorov <atodorov at redhat.com>
---
tests/devices_test/device_packages_test.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/devices_test/device_packages_test.py b/tests/devices_test/device_packages_test.py
index 3e3863f..5c01e24 100644
--- a/tests/devices_test/device_packages_test.py
+++ b/tests/devices_test/device_packages_test.py
@@ -18,9 +18,8 @@ def testPackages(self):
dev = MDRaidArrayDevice("dev", level="raid1", parents=[dev1,dev2])
luks = LUKSDevice("luks", parents=[dev])
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/a7aa32abcbb690338b70540b43b5da6f91c547f3
More information about the anaconda-patches
mailing list