@pytest.fixture(params=[0, 1, (-1)])
def pickle_protocol(request):
 return request.param

@ pytest . fixture ( params = [ 0 , 1 , ( - 1 ) ] ) def pickle_protocol ( request ) : return request . param
fixture to run all the tests for protocols 0 and 1 .