class_docstr: test pytest.deprecated_call()
class_docstr_tok: ["test","pytest.deprecated_call","(",")"]
code: def test_deprecated_call_preserves(self) -> None:
      # Type ignored because `onceregistry` and `filters` are not
      # documented API.
      onceregistry = warnings.onceregistry.copy()  # type: ignore
      filters = warnings.filters[:]
      warn = warnings.warn
      warn_explicit = warnings.warn_explicit
      self.test_deprecated_call_raises()
      self.test_deprecated_call()
      assert onceregistry == warnings.onceregistry  # type: ignore
      assert filters == warnings.filters
      assert warn is warnings.warn
      assert warn_explicit is warnings.warn_explicit
  
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 6 for calling the TestDeprecatedCall obj's underlying member method code with example usage: obj.test_deprecated_call_preserves() without return types