def test_rmtree_retries(tmpdir, monkeypatch):
 monkeypatch.setattr(shutil, 'rmtree', Failer(duration=1).call)
 rmtree('foo')

def test_rmtree_retries ( tmpdir , monkeypatch ) : monkeypatch . setattr ( shutil , 'rmtree' , Failer ( duration = 1 ) . call ) rmtree ( 'foo' )
test pip .