See http://www.pygame.org/docs/ref/display.html#pygame.display.set_caption :
set_caption(title, icontitle=None) -> None
If the display has a window title, this function will change the name on the window. Some systems support an alternative shorter title used for minimized displays.
Your use was correct, so there should be another problem. Either your window is not initialized correctly, or it is not even initialized at all. Promoting your code would be helpful.
source share