Commit cb779a71 by Alexander Popov

Compare against '0' in the 'is not off' check

parent a9ccd7ae
...@@ -110,6 +110,8 @@ class OptCheck: ...@@ -110,6 +110,8 @@ 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':
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'
else: else:
...@@ -278,7 +280,7 @@ class AND(ComplexOptCheck): ...@@ -278,7 +280,7 @@ class AND(ComplexOptCheck):
self.result = 'FAIL: {} is not "{}"'.format(opt.name, opt.expected) self.result = 'FAIL: {} is not "{}"'.format(opt.name, opt.expected)
elif opt.result == 'FAIL: is not present': elif opt.result == 'FAIL: is not present':
self.result = 'FAIL: {} is not present'.format(opt.name) self.result = 'FAIL: {} is not present'.format(opt.name)
elif opt.result == 'FAIL: is off': elif opt.result == 'FAIL: is off' or opt.result == 'FAIL: is off, "0"':
self.result = 'FAIL: {} is off'.format(opt.name) self.result = 'FAIL: {} is off'.format(opt.name)
elif opt.result == 'FAIL: is off, not found': elif opt.result == 'FAIL: is off, not found':
self.result = 'FAIL: {} is off, not found'.format(opt.name) self.result = 'FAIL: {} is off, not found'.format(opt.name)
......
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