title: can pytest ignore a specific warning?
body: <p>I'd like pytest to ignore the RemovedInDjango20Warning.</p>
  
  <p>I currently have this in pytest.ini</p>
  
  <pre><code>[pytest]
  filterwarnings =
      ignore:RemovedInDjango20Warning
  </code></pre>
  
  <p>And that allows pytest to run, but does not suppress the warnings.</p>
  
  <p>If I add a second colon, I get a lot of "INTERNAL ERROR" messages.</p>
  
  <p>If I add a third colon, the tests run, but do not suppress the warnings.</p>
  
  <p>I am afraid to add a fourth colon :)</p>
  
  <p>~</p>
  
  <p>I've also tried being more specific about the error:</p>
  
  <pre><code>ignore:django.RemovedInDjango20Warning
  </code></pre>
  
  <p>and </p>
  
  <pre><code>ignore:django.utils.deprecation.RemovedInDjango20Warning
  </code></pre>
  
  <p>and while those run, I'm still warned every time.</p>
  
  <p>The INTERNALERRORs that I get are:</p>
  
  <pre><code>INTERNALERROR&gt; Traceback (most recent call last):
  INTERNALERROR&gt;   File "/home/chris/.pyenv/versions/3.6.10/lib/python3.6/warnings.py", line 246, in _getcategory
  INTERNALERROR&gt;     cat = getattr(m, klass)
  INTERNALERROR&gt; AttributeError: module 'django' has no attribute 'RemovedInDjango20Warning'
  INTERNALERROR&gt; 
  INTERNALERROR&gt; During handling of the above exception, another exception occurred:
  INTERNALERROR&gt; 
  INTERNALERROR&gt; Traceback (most recent call last):
  INTERNALERROR&gt;   File "/home/chris/.virtualenvs/website-36/lib/python3.6/site-packages/_pytest/main.py", line 196, in wrap_session
  INTERNALERROR&gt;     session.exitstatus = doit(config, session) or 0
  
  [long traceback snipped]
  
  INTERNALERROR&gt;     raise _OptionError("unknown warning category: %r" % (category,))
  INTERNALERROR&gt; warnings._OptionError: unknown warning category: 'django.RemovedInDjango20Warning'
  
  </code></pre>