title: pytest parameterize - row from CSV as a testcase
body: <p>I have to read a CSV file and for each combination in each row need to run some methods.I would like to see each row as a test case. Is it possible to send row as a param - pytest parameterize my test case? Can you please give me some idea on how to do that?</p>
  
  <p>Here is the pseudo code:</p>
  
  <pre><code>class test_mytest:
    def test_rows:
      for row in csvreader:
         run_method(row)
         for onecol in row:
            run_method2(onecol)
  </code></pre>
  
  <p>I have tried reading the <code>pytest</code> documentation but it was not clear for me.</p>
  
  <p>Here is what I am doing for using generate_tests hook for row as a param.I would like to know how to do same for the inner for loop function-this inner loop also should be collected as a test case</p>
  
  <pre><code>def pytest_generate_tests(metafunc):
      read_csvrows()
      for funcargs in metafunc.cls.params[metafunc.function.__name__]:
          # schedule a new test function run with applied **funcargs
          metafunc.addcall(funcargs=funcargs)
  
  class TestClass:
  
      params = {
         'test_rows': rows,   
      }
      def test_rows:
          run_method(row)
          for onecol in row:
               test_method2(onecol)
  </code></pre>
  
  <p>Now, I need to generate reports for the -for loop calling test_method2 (it is parameterized method for list of elements in the column in each row of csv file).  Pytest needs to collect those as test case as well.</p>
  
  <p>Appreciate your help.Thanks</p>