@pytest.fixture
def etreefx(request):
 if (request.param == 'etree'):
  etree.to_etree()
 if (request.param == 'lxml'):
  etree.to_lxml()

@ pytest . fixture def etreefx ( request ) : if ( request . param == 'etree' ) : etree . to_etree ( ) if ( request . param == 'lxml' ) : etree . to_lxml ( )
fixture allowing to test with builtin etree and lxml .