As one of the senior people in my department, I have seen a lot of searches and don't remember any case of a candidate being questioned about his or her political beliefs or ideology, and I don't remember ever being asked about mine when I was on the job market. My dissertation director (now deceased) was very conservative but he had been hired (in a humanities field) by what was already one of the most left-wing universities in the country.
They don’t need to directly ask you your political persuasion.
Remember when it was said that Obama had a huge database mining operation?
They look at what magazines you read. They look at what groups you belong to. They see if you’ve donated money to a certain party. They look at where you live.
The Democrats can, with very good accuracy, predict your political leaning.
They can also do it in your interview.
They have had years to develop their questions.
The question is your experience or mine the exception. I don’t know, but what I observed was and still is repeated across both public and private universities. I would be surprised to hear questions or discussion about political beliefs in the formal process, it operates in a much more subtle fashion, but still happens none the less.