The phrase "exception that proves the rule" is from the Latin "exceptio probat regulam in casibus non exceptis," or "the exception confirms the rule in cases not excepted." The Wikipedia article[0] is actually pretty interesting, and among other things suggests that your interpretation of "proves" as "tests" is false.
[0] https://en.wikipedia.org/wiki/Exception_that_proves_the_rule