I believe the test script for e.g. sphere is a PyMOL script, not a Python script. So the way to do the tst is to save the script as a file named e.g. "test-sphere.pml" and then in PyMOL command line, type "@test-sphere.pml" to run this automated test. Saving it as a Python script and use FILE->RUN won't work.
Thanks for the feedback, I'll update the page to reflect this. FILE->RUN works with MacPyMOL and PyMOLX11Hybrid; both are commercial versions of PyMOL for Apple OS X.
Just tested this on OS X Lion.
Can't get sphere to work
Tried it with PyMOL 188.8.131.52 with Python 2.6.6 or 2.7.3, on a Sony VAIO running Vista Business with nVidia GeForce 8400M GS. Caused a crash at the final draw command complaining something about the graphics driver, and thus a runtime error.
Since you are having this problem on a Microsoft Windows platform, my first guess would be that the nVidia graphics drivers need updating as they may not be supporting the advanced OpenGL features required for this to work. Give it another shot on a different platform perhaps? :-)