title: How to add a custom flag to pytest, using the short form
body: <p>I was following <a href="https://stackoverflow.com/questions/47559524/pytest-how-to-skip-tests-unless-you-declare-an-option-flag">this</a> answer about how to add custom arguments to pytest in order to skip tests with the custom marker. It works, but I can't seem to customize it to use a short version of the flag.</p>
  <p>I've added these functions to my <code>conftest.py</code>:</p>
  <pre class="lang-py prettyprint-override"><code>def pytest_addoption(parser):
      parser.addoption(&quot;-fs&quot;, dest='full_suite', action=&quot;store_true&quot;,
          help=&quot;Run the full test suite. Includes tests marked with the mark.full_suite flag&quot;)
  
  
  def pytest_runtest_setup(item):
      if 'full_suite' in item.keywords and not item.config.getoption(&quot;-fs&quot;):
          pytest.skip(&quot;You need the -fs option to run this test&quot;)
  </code></pre>
  <p>And then I write this test:</p>
  <pre class="lang-py prettyprint-override"><code>@pytest.mark.full_suite
  def test_something():
      assert True
  </code></pre>
  <p>If I use the long option, for example, <code>--fs</code>, rather than <code>-fs</code>, it will work, and dest will be assigned to <code>fs</code>. With the short option, I'm apparently required to supply the <code>dest</code> keyword. But I did this, I added <code>dest='full_suite</code>. Despite that, I get this error:</p>
  <pre><code>....
   self.option_id = str(option)
    File &quot;/home/jokea/Carbonspace/cs-landsat-sentinel/.python3.8_env/lib/python3.8/site-packages/_pytest/config/argparsing.py&quot;, line 326, in __repr__
      args += [&quot;dest: &quot; + repr(self.dest)]
  AttributeError: 'Argument' object has no attribute 'dest'
  </code></pre>
  <p>What am I missing?</p>