change deprecation warning tests to have a more lenient error detection