pytest html report generation
<p>I'm trying to use pytest-html plugin to generate the html report from py.test runs,</p>

<pre><code>@pytest.fixture()
def get_requests_info():
 ....
 return [(0,'request1'),(1,'request2')]

@pytest.mark.parametrize("request", get_requests_info())
    def test_a_vs_b(request):
     .....
</code></pre>

<p>How should i set the environment fixture to create the html reports?</p>

<p>If I simply add,</p>

<pre><code>@pytest.fixture(autouse=True)
def _environment(request):
    request.config._environment.append(('foo'))
</code></pre>

<p>I'm getting error like,</p>

<pre><code>    @pytest.fixture(scope='session', autouse=True)
    def environment(request):
        """Provide environment details for HTML report"""
&gt;       request.config._environment.extend([
            ('Python', platform.python_version()),
            ('Platform', platform.platform())])
E       AttributeError: 'tuple' object has no attribute 'config'
</code></pre>

<p>Any suggestions?</p>