Skip to content

Commit

Permalink
Use len of set to check for duplicates in list of packages.
Browse files Browse the repository at this point in the history
Resolves: #154.

Checking for equality of the two lists was a mistake, since
the order of the list generated from the set is undefined.
  • Loading branch information
atodorov committed Jun 11, 2015
1 parent 40a2d5b commit 443874d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/devices_test/device_packages_test.py
Expand Up @@ -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:
Expand Down

0 comments on commit 443874d

Please sign in to comment.