Would showing up only for tests be frowned upon by most professors? Because of a personal situation, I'm currently unable to attend most lectures (lately none) of a particular math class. However, I have a friend in  my section who keeps me updated with the material covered, homework assignments, and exam dates. 

I had previously spoken to the professor, explaining that I might be missing sessions throughout the semester, and she seemed understanding; lately, however, I stopped going altogether, and I've exclusively shown up for mid-term examinations (on which I do ok). To my surprise, I've been able to teach my self quite well, and, given that it saves me a considerable amount of time, I've been thinking of adopting this practice in the future.  

My question is, given attendance isn't compulsory, would professors mind this, or develop any kind of resentment toward students who engage in this behavior? I'm a third year undergrad in a public university in Texas.



I'm not really sure whether this question is off-topic for this stack, so I apologize in advance if it is. Please feel free to change the tags as appropriate. Thank you
Depending on class size, most professors won't notice if students are missing or not. When I miss someone, then this person has been active before and then I would miss him/her, but if this happens, I usually ask them if there are problems.

The other view on it is: If attending the lecture gives no benefit, then the professor should ask himself/herself why they are teaching like this. For example, I have some of my lectures on video and students can freely decide to show up or watch the old videos. Still, most are showing up and they usually are having better grades then the ones which don't show up. But this is not because I dongrade the others, it's because they understand the topics more deeply thanks to the disussions in the lectures.