class_docstr: test pytest.deprecated_call()
class_docstr_tok: ["test","pytest.deprecated_call","(",")"]
code: def test_deprecated_call_specificity(self) -> None:
      other_warnings = [
          Warning,
          UserWarning,
          SyntaxWarning,
          RuntimeWarning,
          ImportWarning,
          UnicodeWarning,
      ]
      for warning in other_warnings:
  
          def f():
              warnings.warn(warning("hi"))
  
          with pytest.warns(warning):
              with pytest.raises(pytest.fail.Exception):
                  pytest.deprecated_call(f)
              with pytest.raises(pytest.fail.Exception):
                  with pytest.deprecated_call():
                      f()
  
imports: import warnings
  from typing import List
  from typing import Optional
  from typing import Type
  import pytest
  from _pytest.pytester import Pytester
  from _pytest.recwarn import WarningsRecorder
label_desc: Use image node_id 11 for calling the TestDeprecatedCall obj's underlying member method code with example usage: obj.test_deprecated_call_specificity() without return types