title: How can I conditionally skip a parameterized pytest scenario?
body: <p>I need to flag certain tests to be skipped. However, some of the tests are parameterized and I need to be able to skip only certain of the scenarios.</p>
  
  <p>I invoke the test using <code>py.test -m "hermes_only"</code> or <code>py.test -m "not hermes_only"</code> as appropriate.</p>
  
  <p>Simple testcases are marked using:</p>
  
  <pre class="lang-py prettyprint-override"><code>@pytest.mark.hermes_only
  def test_blah_with_hermes(self):
  </code></pre>
  
  <p>However, I have some parameterized tests:</p>
  
  <pre class="lang-py prettyprint-override"><code>outfile_scenarios = [('buildHermes'),
                       ('buildTrinity')]
  
  @pytest.mark.parametrize('prefix', outfile_scenarios)
  def test_blah_build(self, prefix):
      self._activator(prefix=prefix)
  </code></pre>
  
  <p>I would like a mechanism to filter the scenario list or otherwise skip certain tests if a pytest mark is defined. </p>
  
  <p>More generally, how can I test for the definition of a pytest mark?</p>
  
  <p>Thank you.</p>