title: Pytest: How to parametrize input
body: <p>Is there a way to pass input to pytest.mark.parametrize()?</p>
  <p>If I try…</p>
  <pre class="lang-py prettyprint-override"><code>import pytest
  from typing import List
  
  
  @pytest.mark.parametrize(&quot;rotation&quot;, range(len(input_sequence)))
  def test_sequence_rotation(
      input_sequence: List[float],
      rotation: int,
  ) -&gt; None:
      sequence = input_sequence[rotation:] + input_sequence[:rotation]
      print(f&quot;Testing sequence {sequence}&quot;)
  
  </code></pre>
  <p>… I get <code>NameError: name 'input_sequence' is not defined</code>.</p>
  <p>For some context, I have <code>input_sequence</code> defined as a pytest command option in conftest.py:</p>
  <pre class="lang-py prettyprint-override"><code>import pytest
  from typing import List
  from _pytest.config.argparsing import Parser
  from _pytest.fixtures import SubRequest
  
  
  def pytest_addoption(parser: Parser) -&gt; None:
      parser.addoption(&quot;--sequence-csv&quot;, type=str, required=True)
  
  
  @pytest.fixture()
  def input_sequence(request: SubRequest) -&gt; List[float]:
      csv = request.config.getoption(&quot;--sequence-csv&quot;)
      return [float(i) for i in csv.split(&quot;,&quot;)]
  </code></pre>