use ``assert not …`` in both cases instead of comparing with ``False``.