diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-07-01 07:34:23 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-07-01 07:34:23 +0200 |
commit | 52a321d839b366d40fdd72bbb6c494016fa3d608 (patch) | |
tree | f8699a302e162eedd83e3aad809f4f0a128234e3 /test | |
parent | 64ea3f926dfd43b52d7ef0399e44ce00587b5993 (diff) |
sysv-generator test: Fix random ordering failure
test_simple_escaped() sometimes fails with
AssertionError: Lists differ: ['foo\\x2b.service', 'foo-admin.service'] != ['foo-admin.service', 'foo\\x2b.service']
We don't need to assume any order here, so compare them as a set, not a list.
Diffstat (limited to 'test')
-rw-r--r-- | test/sysv-generator-test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py index 23d6646bba..721e53a4ee 100644 --- a/test/sysv-generator-test.py +++ b/test/sysv-generator-test.py @@ -196,7 +196,7 @@ class SysvGeneratorTest(unittest.TestCase): self.add_sysv('foo+', {}) self.add_sysv('foo-admin', {}) err, results = self.run_generator() - self.assertEqual(list(results), ['foo-admin.service', 'foo\\x2b.service']) + self.assertEqual(set(results), {'foo-admin.service', 'foo\\x2b.service'}) self.assertNotIn('Overwriting', err) def test_simple_enabled_some(self): |