assert not before_existing or (top and bottom)
assert not (commit and before_existing)
assert (top and bottom) or (not top and not bottom)
assert not before_existing or (top and bottom)
assert not (commit and before_existing)
assert (top and bottom) or (not top and not bottom)