You don't have to go at the same pace as everyone else.If you want to sit through the class, sure you can do that, or you can ask the teacher/advisor/dean what it takes to test out of the class. Go buy the book and go through all the examples and you should be able to test out of the class most of the time. I did this with one of my classes, and if I were to go back to school, I'd try to do this with every class that I could except research classes.
I was never allowed to test out of classes. I always asked when I felt it was reasonable, and always met with the same response. Though I did have a couple of great professors who would stay with me after class occasionally to talk about whatever I was working on at the time.
I had one class that I wasn't allowed to test out of during my second to last semester. The professor told us that all of the assignments were up on the portal for the class. I asked him if I could turn in all of the assignments the first week of class. He said yes but wasn't sure that I'd know the material. I arranged a deal that I would turn in all of the assignments the first week and as long as I got an A on every assignment, he would give me the final the at the beginning of the third week and I wouldn't have to show up to class again if I got an A. It's not always easy, and sometimes you've got to get dean/provost approval, but if you really want to do something, you can most likely do it.