Commit fa8743fc by Alexander Popov

backport: Fix the bug in OptCheck.check() introduced in cb779a71

Use 'elif' instead of 'if' to avoid wrong self.result when
self.state is 'off'.

We need unit-tests for the engine checking the correctness: #79
parent 295a293b
...@@ -96,7 +96,7 @@ class OptCheck: ...@@ -96,7 +96,7 @@ class OptCheck:
if self.expected == 'is not off': if self.expected == 'is not off':
if self.state == 'off': if self.state == 'off':
self.result = 'FAIL: is off' self.result = 'FAIL: is off'
if self.state == '0': elif self.state == '0':
self.result = 'FAIL: is off, "0"' self.result = 'FAIL: is off, "0"'
elif self.state is None: elif self.state is None:
self.result = 'FAIL: is off, not found' self.result = 'FAIL: is off, not found'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment