title: How to Assert we have AssertionError in python?
body: <p>I have a method:</p>
  
  <pre><code>def cargo_add(self, new_cargo):
      assert (new_cargo.weight + self.cargo_weight()) \
          &lt;= self.cargocapacity, "Not enough Space left"
  </code></pre>
  
  <p>And i would like to test its functionallyty with someting like:</p>
  
  <pre><code>def _test_cargo_add():
      assert cShip.cargo_add(c1) is AssertionError
  </code></pre>
  
  <p>So i can test the error Handling. But when the first assert is wrong the program stopps.</p>