In pytest.ini, I have : addopts = --html $APPRENTI_MOTEUR_LOGS_DIR_TEST/$APPRENTI_MOTEUR_LOGS_HTML_NAME The path of the html report takes the content of the environment variable into account. But the page header does not :  It would be nice if it would as well :-)