class_docstr: A context manager to record raised warnings.
  
  Adapted from `warnings.catch_warnings`.
class_docstr_tok: ["A","context","manager","to","record","raised","warnings",".","Adapted","from","`","warnings.catch_warnings","`","."]
docstr: Pop the first recorded warning, raise exception if not exists.
docstr_tok: ["Pop","the","first","recorded","warning",",","raise","exception","if","not","exists","."]
code: def pop(self, cls=Warning):
      """Pop the first recorded warning, raise exception if not exists."""
      for i, w in enumerate(self._list):
          if issubclass(w.category, cls):
              return self._list.pop(i)
      __tracebackhide__ = True
      raise AssertionError("%r not found in warning list" % cls)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  import re
  import sys
  import warnings
  import six
  import _pytest._code
  from _pytest.deprecated import PYTEST_WARNS_UNKNOWN_KWARGS
  from _pytest.deprecated import WARNS_EXEC
  from _pytest.fixtures import yield_fixture
  from _pytest.outcomes import fail
label_desc: Use image node_id 6 for calling the WarningsRecorder obj's underlying member method code with example usage: obj.pop(cls) and returns: self