title: How to assert all asserts failed in python
body: <p>I'm trying to write examples of how NOT to write tests in pytest. For this, I'd like to be able to somehow mod test functions so that they fail if any assert passes. This is easy with one assert using a decorator:</p>
  
  <pre><code>def faulty_test(test_fn):
      def new_test_fn():
          try:
              test_fn()
          except AssertionError:
              pass
          else:
              raise AssertionError
  
      return new_test_fn
  
  @faulty_test
  def test_sth():
      assert 1 == 2
  </code></pre>
  
  <p>but I'd like to do it for a function with any number of asserts. The test should fail if any of the asserts pass. It doesn't have to be a decorator</p>