Some of the best teachers I had in high school did this.
Ditto. This one I am thinking of dared us to identify is actual beliefs, and we could not. Each week he'd offer differing nonverbal clues (manner of dress, T-shirts, hats, etc.) to hint at differing subcultures or ideas and we never could identify WHAT he actually believed! It fostered some very effective discussion as a result, but he was able to masterfully direct the discussion so that it remained on task and never degenerated into an attack on anyone or their beliefs. It was an excellent lesson.
I also had a history professor who was a devout leftist and agnostic, but, he never penalized me for my thoughts on particular subjects nor other students. He had told me that so long as I supported my arguments in my papers, I would receive fair treatment even if my opinions differed from his - and he was true to his word. This professor and I became friends and stayed in touch afterwards for many years even though we shared very little in the way of the same values or political ideals.
While I was fortunate with political leanings, my wife had a high school teacher that gave extra credit to students (18 years old) who showed him proof that they registered as Democrats. If you registered as a Republic, he dropped their grade a full level! Her sister registered as a Republic and got the only B in her academic career, and my wife registered Dem. and got an A in spite of her typically being a B student in the class (she wanted the easy A and she got it). THAT kind of things is - or SHOULD BE - unacceptable.