Skip to content

Tests on Python 3.13  #31

@fabaff

Description

@fabaff

Two tests on Python 3.13 are failing. They pass on Python 3.12.

============================= test session starts ==============================
platform linux -- Python 3.13.1, pytest-8.3.3, pluggy-1.5.0
rootdir: /build/source
collected 196 items / 2 deselected / 194 selected                              

tests/test_core.py ..................................................... [ 27%]
x...........................................x........................... [ 64%]
.....................x..........x...xx.x..                               [ 86%]
tests/test_typed.py .....................F....F                          [100%]

=================================== FAILURES ===================================
_____________________________ test_tenum_docstring _____________________________

    def test_tenum_docstring() -> None:
        class TestEnum(cst.EnumBase):
            """
            This is an test enum.
            """
    
            Value_WithDoc = cst.EnumValue(0, doc="an enum with a documentation")
            Value_WithMultilineDoc = cst.EnumValue(
                1,
                """
                An enum with a multiline documentation...
                ...next line...
                """,
            )
            Value_NoDoc = cst.EnumValue(2)
            Value_NoDoc2 = 3
    
>       assert (
            TestEnum.__doc__
            == """
            This is an test enum.
            """
        )
E       AssertionError: assert '\nThis is an test enum.\n' == '\n        Th...um.\n        '
E         
E           
E         -         This is an test enum.
E         ? --------
E         + This is an test enum.
E         -

tests/test_typed.py:439: AssertionError
__________________________ test_tenum_flags_docstring __________________________

    def test_tenum_flags_docstring() -> None:
        class TestEnum(cst.FlagsEnumBase):
            """
            This is an test flags enum.
            """
    
            Value_WithDoc = cst.EnumValue(0, doc="an enum with a documentation")
            Value_WithMultilineDoc = cst.EnumValue(
                1,
                """
                An enum with a multiline documentation...
                ...next line...
                """,
            )
            Value_NoDoc = cst.EnumValue(2)
            Value_NoDoc2 = 4
    
>       assert (
            TestEnum.__doc__
            == """
            This is an test flags enum.
            """
        )
E       AssertionError: assert '\nThis is an...flags enum.\n' == '\n        Th...um.\n        '
E         
E           
E         -         This is an test flags enum.
E         ? --------
E         + This is an test flags enum.
E         -

tests/test_typed.py:552: AssertionError
=============================== warnings summary ===============================
tests/test_core.py::test_checksum_warnings_issue_841
  /build/source/tests/test_core.py:1253: ChecksumWarning: wrong checksum, read b'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', computed b'5ea71dc6d0b4f57bf39aadd07c208c35f06cd2bac5fde210397f70de11d439c62ec1cdf3183758865fd387fcea0bada2f6c37a4a17851dd1d78fefe6f204ee54', path (parsing) -> checksum
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_typed.py::test_tenum_docstring - AssertionError: assert '\nThis is an test enum.\n' == '\n        Th...um.\n...
FAILED tests/test_typed.py::test_tenum_flags_docstring - AssertionError: assert '\nThis is an...flags enum.\n' == '\n        Th...um...
====== 2 failed, 185 passed, 2 deselected, 7 xfailed, 1 warning in 4.43s =======

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions