Like Erik, I have (and am unfortunately often still) been in the situation where only one person shows up for class and I end up doing a private class. Because of this, I have cut down on the classes I offer in order to hopefully boost the attendance in the other classes. In the 1.5 years I've been running the dojo, I've cancelled once (or twice) when someone showed up alone, and it was only because I was too depressed by the situation to teach (it was the third or fourth time in a row). Otherwise we do bokken work, or a particular aspect of ukemi, or whatever. I feel I have an obligation to my students, no matter what. But if I am not in a state to teach, then it is really hard to do! I have one student who drives 45 minutes to class, and I would NEVER cancel on him; he's made a huge effort to get there. The class I did cancel the student came about 20 minutes drive, and in retrospect, I should have taught anyway.
This is my feeling of obligation to the students who put their trust in me. I feel very honored that they have done so, and would never conciously do anything to compromise that trust (and not teaching when they have come for class would do just that).