Is it possible to quantify 'pettiness' in a personality?
This sounds like Obsessive Compulsive Personality Disorder. Individuals with OCPD tend to obsess over unimportant details to the extent of it causing significant distress and a negative impact on productivity. 

I'm not personally aware of a test to diagnose OCPD, but the DSM does contain diagnostic criteria for the disorder.