diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py index 9a9e4d1658..ec1c75a854 100755 --- a/test/rule-syntax-check.py +++ b/test/rule-syntax-check.py @@ -8,8 +8,6 @@ import re import sys -import os -from glob import glob rules_files = sys.argv[1:] if not rules_files: diff --git a/test/sd-script.py b/test/sd-script.py index 7662b12ab8..51ebf70c39 100644 --- a/test/sd-script.py +++ b/test/sd-script.py @@ -100,6 +100,12 @@ class SD(object): def __cmp__(self, other): return cmp(self._num, other._num) + def __eq__(self, other): + return self.__cmp__(other) == 0 + + def __ne__(self, other): + return not self.__eq__(other) + def __hash__(self): return hash(self._num) diff --git a/test/test-exec-deserialization.py b/test/test-exec-deserialization.py index 06a7d369f6..08307b18d7 100755 --- a/test/test-exec-deserialization.py +++ b/test/test-exec-deserialization.py @@ -200,7 +200,7 @@ class ExecutionResumeTest(unittest.TestCase): self.reload() time.sleep(5) - self.assertTrue(subprocess.call("journalctl -b _PID=1 | grep -q 'Freezing execution'", shell=True) != 0) + self.assertNotEqual(subprocess.call("journalctl -b _PID=1 | grep -q 'Freezing execution'", shell=True), 0) def tearDown(self): for f in [self.output_file, self.unitfile_path]: