domdfcoding / domdf_python_tools

Helpful functions for Python 🐍 🛠️
https://domdf-python-tools.readthedocs.io/en/latest
MIT License
6 stars 4 forks source link

3.4.0: pytest falling in test_iter_submodules #87

Closed Ancieg closed 2 years ago

Ancieg commented 2 years ago

Description

pytest falling in test_iter_submodules

Steps to Reproduce

  1. Run python3 -m pytest

Actual result:

Output:

=================================== FAILURES ===================================
______________________ test_iter_submodules[asyncio-3.10] ______________________

version = '3.10', module = 'asyncio'
advanced_data_regression = <coincidence.regressions.AdvancedDataRegressionFixture object at 0x7fc9dba3ca60>

    @pytest.mark.parametrize(
            "version",
            [
                    pytest.param(3.6, marks=only_version(3.6, reason="Output differs on Python 3.6")),
                    pytest.param(
                            3.7,
                            marks=[
                                    only_version(3.7, reason="Output differs on Python 3.7"),
                                    not_pypy("Output differs on PyPy")
                                    ]
                            ),
                    pytest.param(
                            "3.7-pypy",
                            marks=[
                                    only_version(3.7, reason="Output differs on Python 3.7"),
                                    only_pypy("Output differs on PyPy")
                                    ]
                            ),
                    pytest.param(
                            3.8,
                            marks=[
                                    only_version(3.8, reason="Output differs on Python 3.8"),
                                    not_pypy("Output differs on PyPy 3.8")
                                    ]
                            ),
                    pytest.param(
                            "3.8_pypy",
                            marks=[
                                    only_version(3.8, reason="Output differs on Python 3.8"),
                                    only_pypy("Output differs on PyPy 3.8")
                                    ]
                            ),
                    pytest.param(
                            3.9,
                            marks=[
                                    only_version(3.9, reason="Output differs on Python 3.9"),
                                    not_pypy("Output differs on PyPy 3.9")
                                    ]
                            ),
                    pytest.param(
                            "3.9_pypy",
                            marks=[
                                    only_version(3.9, reason="Output differs on Python 3.9"),
                                    only_pypy("Output differs on PyPy 3.9")
                                    ]
                            ),
                    pytest.param("3.10", marks=only_version("3.10", reason="Output differs on Python 3.10")),
                    ]
            )
    @pytest.mark.parametrize(
            "module",
            [
                    "collections",
                    "importlib",
                    "domdf_python_tools",
                    "consolekit",
                    "asyncio",
                    "json",
                    "cRQefleMvm",
                    "reprlib"
                    ],
            )
    def test_iter_submodules(version, module: str, advanced_data_regression: AdvancedDataRegressionFixture):
>       advanced_data_regression.check(list(iter_submodules(module)))
E    AssertionError: FILES DIFFER:
E    /usr/src/tmp/pytest-of-builder/pytest-0/test_iter_submodules_asyncio_30/test_import_tools_/test_iter_submodules_asyncio_3_10_.yml
E    /usr/src/tmp/pytest-of-builder/pytest-0/test_iter_submodules_asyncio_30/test_import_tools_/test_iter_submodules_asyncio_3_10_.obtained.yml
E    HTML DIFF: /usr/src/tmp/pytest-of-builder/pytest-0/test_iter_submodules_asyncio_30/test_import_tools_/test_iter_submodules_asyncio_3_10_.obtained.diff.html
E    --- 
E    +++ 
E    @@ -27,5 +27,3 @@
E     - asyncio.transports
E     - asyncio.trsock
E     - asyncio.unix_events
E    -- asyncio.windows_events
E    -- asyncio.windows_utils

tests/test_import_tools.py:190: AssertionError

Expected result:

No AssertionError

Reproduces how often:

Always

Version

Installation source

GitHub repository.

Other Additional Information:

None.