title: How to disable internal pytest warnings?
body: <p>I want to disable all pytest internal warnings like <code>PytestCacheWarning</code> in <code>pytest.ini</code> but currently have no luck with it. The following ini file doesn't work as I expect:</p>
  
  <pre><code>[pytest]
  filterwarnings:
      ignore::pytest.PytestCacheWarning
  </code></pre>
  
  <p>What is the right way to do it? Note: I don't want to disable all warnings, only those defined inside pytest implementation.</p>
  
  <hr>
  
  <p>Minimal reproducible example:</p>
  
  <p>1) Create the following structure:</p>
  
  <pre><code>some_dir/
      .pytest_cache/
      test_something.py
      pytest.ini
  </code></pre>
  
  <p>2) Put this into <code>test_something.py</code> file:</p>
  
  <pre><code>def test_something():
      assert False
  </code></pre>
  
  <p>3) Put this into <code>pytest.ini</code> file:</p>
  
  <pre><code>[pytest]
  filterwarnings:
      ignore::pytest.PytestCacheWarning
  </code></pre>
  
  <p>4) do <code>chmod 444 .pytest_cache</code> to procude <code>PytestCacheWarning: could not create cache path</code> warning</p>
  
  <p>5) run <code>pytest</code>:</p>
  
  <pre><code>========================== test session starts ===========================
  platform linux -- Python 3.7.6, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
  rootdir: /home/sanyash/repos/reproduce_pytest_bug, inifile: pytest.ini
  plugins: celery-4.4.0, aiohttp-0.3.0
  collected 1 item                                                         
  
  test_something.py F                                                [100%]
  
  ================================ FAILURES ================================
  _____________________________ test_something _____________________________
  
      def test_something():
  &gt;       assert False
  E       assert False
  
  test_something.py:2: AssertionError
  ============================ warnings summary ============================
  /home/sanyash/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:137
    /home/sanyash/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:137: PytestCacheWarning: could not create cache path /home/sanyash/repos/reproduce_pytest_bug/.pytest_cache/v/cache/stepwise
      self.warn("could not create cache path {path}", path=path)
  
  /home/sanyash/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:137
    /home/sanyash/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:137: PytestCacheWarning: could not create cache path /home/sanyash/repos/reproduce_pytest_bug/.pytest_cache/v/cache/nodeids
      self.warn("could not create cache path {path}", path=path)
  
  /home/sanyash/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:137
    /home/sanyash/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:137: PytestCacheWarning: could not create cache path /home/sanyash/repos/reproduce_pytest_bug/.pytest_cache/v/cache/lastfailed
      self.warn("could not create cache path {path}", path=path)
  
  -- Docs: https://docs.pytest.org/en/latest/warnings.html
  ===================== 1 failed, 3 warnings in 0.03s ======================
  </code></pre>