I don't think it's as simple as 'I definitely would/wouldn't be friends with a racist'.
There was a boy at my school who took great pride in being a racist. He was a clever boy and the girls loved him. I couldn't stand him and was possibly the only person in our year who saw his Nazi sympathies as anything other than an endearing personality quirk.
People can be stupid when they're young though, and whenever I met him after leaving school I was very polite and tried to give him the benefit of the doubt. However, he tried to add me on facebook and his profile picture was Nick Griffin. Request ignored...
But then on the other hand, my DP's granddad, who we used to live with, would come out with horrendous comments about 'wogs' and 'nig nogs'. We challenged him on it, but we love him anyway because he is a kind, gentle old guy who never wished real harm on anybody. He said racist things, but he doesn't actually have a hateful bone in his body,
It's a moot point anyway because these are nit the type of people I have much in common with, so it's unlikely to come up. Back home in Glasgow the biggest issue for me was always religious bigotry, which was deeply ingrained in a lot of young people in my social circle.