Comment 9 for bug 1383315

Revision history for this message
Andrew Woodward (xarses) wrote :

Testing changing from or to and

I: images_ceph
O: objects_ceph
V: images_vcenter
R: expected result

items = [
  # I, O, V, R
  (True, True, True, False), #Shouldn't happen
  (True, False, True, False),
  (False, False, True, False),
  (True, True, False, False),
  (False, True, True, False),
  (False, True, False, True),
  (True, False, False, True),
  (False, False, False, True),]

def result((i,o,v,r)):
  result = not (i and o) and not v
  print "not (%s and %s) and not %s .. expected %s, got %s" %(i, o, v, r, result)
  return result == r

# In python interperter
>>> for each in items: result(each)...
not (True and True) and not True .. expected False, got False
True
not (True and False) and not True .. expected False, got False
True
not (False and False) and not True .. expected False, got False
True
not (True and True) and not False .. expected False, got False
True
not (False and True) and not True .. expected False, got False
True
not (False and True) and not False .. expected True, got True
True
not (True and False) and not False .. expected True, got True
True
not (False and False) and not False .. expected True, got True
True