diff --git a/betterproto2/tests/test_documentation.py b/betterproto2/tests/test_documentation.py index e051bb0..875c787 100644 --- a/betterproto2/tests/test_documentation.py +++ b/betterproto2/tests/test_documentation.py @@ -1,5 +1,6 @@ import ast import inspect +import sys from tests.util import requires_grpclib # noqa: F401 @@ -43,7 +44,19 @@ def test_documentation(requires_grpclib) -> None: def test_escaping(requires_grpclib) -> None: from .outputs.documentation.documentation import ComplexDocumentation - ComplexDocumentation.__doc__ == """ + if sys.version_info >= (3, 13): + assert ( + ComplexDocumentation.__doc__ + == """ +A comment with backslashes \\ and triple quotes \"\"\" +Simple quotes are not escaped " +""" + ) + else: + assert ( + ComplexDocumentation.__doc__ + == """ A comment with backslashes \\ and triple quotes \"\"\" Simple quotes are not escaped " """ + )