@pytest.fixture(params=list(range(0, (pickle.HIGHEST_PROTOCOL + 1))))
def protocol(request):
 return request.param

@ pytest . fixture ( params = list ( range ( 0 , ( pickle . HIGHEST_PROTOCOL + 1 ) ) ) ) def protocol ( request ) : return request . param
fixture to run all the tests for all available pickle protocols .