[rhinstaller/blivet/pulls/155 master] Sort the lists before comparing because coversion to set reverses order in Python3

vpodzime installerbot-noreply at redhat.com
Wed Jun 10 13:36:58 UTC 2015


> @@ -18,9 +18,12 @@ def testPackages(self):
>          dev = MDRaidArrayDevice("dev", level="raid1", parents=[dev1,dev2])
>          luks = LUKSDevice("luks", parents=[dev])
>          packages = luks.packages
> +        packages.sort() # sort due to blivet/issues/154
>  
>          # no duplicates in list of packages
> -        self.assertListEqual(packages, list(set(packages)))
> +        l = list(set(packages))
> +        l.sort() # sort due to blivet/issues/154
> +        self.assertListEqual(packages, l)

Why don't we just compare the sets? The order of the packages doesn't matter to us, AFAICT.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/155#discussion_r32117327


More information about the anaconda-patches mailing list