[testing] port test_trainer_distributed to run with pytest
Extracting the request from https://github.com/huggingface/transformers/pull/7993#issuecomment-716508513 to this issue to make it easier to track.

Now that we have a framework to run distributed under `pytest` `test_trainer_distributed` needs to be ported there. 

I will work on that.

Ooops, closed it by mistake too early. But it has been resolved here:
https://github.com/huggingface/transformers/pull/8107