class_docstr: Note: all pytest runs are executed in a subprocess so we don't inherit warning filters
  from pytest's own test suite
class_docstr_tok: ["Note",":","all","pytest","runs","are","executed","in","a","subprocess","so","we","do","n't","inherit","warning","filters","from","pytest","'s","own","test","suite"]
code: def create_file(self, pytester: Pytester, mark="") -> None:
      pytester.makepyfile(
          """
              import pytest, warnings
  
              warnings.warn(DeprecationWarning("collection"))
  
              {mark}
              def test_foo():
                  warnings.warn(PendingDeprecationWarning("test run"))
          """.format(
              mark=mark
          )
      )
  
imports: import os
  import sys
  import warnings
  from typing import List
  from typing import Optional
  from typing import Tuple
  import pytest
  from _pytest.fixtures import FixtureRequest
  from _pytest.pytester import Pytester
label_desc: Use image node_id 1 for calling the TestDeprecationWarningsByDefault obj's underlying member method code with example usage: obj.create_file(pytester, mark) without return types