You didn't fail the test, you bombed out.
After all the tune-up work & O2 sensor replacement you have done, it's probably worth giving it another shot.
How much are they charging you each time?
If you still have trouble passing, unfortunately it may be time to suspect the effectiveness of your 20 year old catalytic converter(s).
I noticed the previous owner was walking a thin line on CO as well.
As I said before, you really can not calculate grams per mile into percentages, as they are two totally different tests.