This test is very helpful to make certain whether it is really the coccyx that is the source of the pain.
The doctor injects you with a local anesthetic around the coccyx, and asks you to go and sit down for a while. This is to see if the anesthetic relieves the pain for an hour or two. If it does, then they know that your the tissues around the coccyx are the source of the pain. If the injection does not relieve the pain, even for a while, then it is likely that it is not the coccyx, but one of the other possible causes of pain in this area (see What is coccydynia?).
A similar test is carried out for pudendal neuropathy, though in that case it is the tissues around the pudendal nerve that are injected with anesthetic.
The method is described in the paper: Coccydynia/Levator Syndrome, A Therapeutic Test . The paper says: 'This test is inexpensive, reliable, minimally painful, without complications and should be performed when a vague rectal pain is not explained by physical findings.'