def test_ioerror_if_replay_dir_creation_fails(mock_ensure_failure, replay_test_dir):
 with pytest.raises(IOError):
  replay.dump(replay_test_dir, 'foo', {'cookiecutter': {'hello': 'world'}})
 mock_ensure_failure.assert_called_once_with(replay_test_dir)

def test_ioerror_if_replay_dir_creation_fails ( mock_ensure_failure , replay_test_dir ) : with pytest . raises ( IOError ) : replay . dump ( replay_test_dir , 'foo' , { 'cookiecutter' : { 'hello' : 'world' } } ) mock_ensure_failure . assert_called_once_with ( replay_test_dir )
test that replay .