rachmadaniHaryono / we-get

:icecream: Command-line tool for searching torrents.
MIT License
155 stars 26 forks source link

tests fail with `tests/test_doc.py:31: AssertionError`. #55

Open dreirund opened 5 days ago

dreirund commented 5 days ago

Ahoj,

when I build this with python -m build --wheel --no-isolation and then run tests with python -m pytest, a test on documentation fails with tests/test_doc.py:31: AssertionError:
python -m pytest:

======================================================================================== test session starts ========================================================================================
platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
rootdir: /var/cache/makepkg/build/we-get-git/src/we-get
configfile: setup.cfg
plugins: anyio-4.4.0, typeguard-4.3.0
collected 20 items                                                                                                                                                                                  

tests/test_arguments.py .............                                                                                                                                                         [ 65%]
tests/test_core_we_get.py ...                                                                                                                                                                 [ 80%]
tests/test_doc.py .F                                                                                                                                                                          [ 90%]
tests/test_the_pirate_bay.py .                                                                                                                                                                [ 95%]
tests/test_utils.py .                                                                                                                                                                         [100%]

============================================================================================= FAILURES ==============================================================================================
_____________________________________________________________________________________________ test_year _____________________________________________________________________________________________

    def test_year():
        current_year = datetime.now().year
        path = Path(__file__).parent.parent / 'we_get' / 'core' / 'we_get.py'
        with path.open() as f:
            m_content = f.read()
        m_content.splitlines()[1]
        year = m_content.split('Copyright (c) 2016-')[1].split(' ')[0]
>       assert year == str(current_year)
E       AssertionError: assert '2020' == '2024'
E         
E         - 2024
E         ?    ^
E         + 2020
E         ?    ^

tests/test_doc.py:31: AssertionError
========================================================================================= warnings summary ==========================================================================================
../../../../../../../usr/lib/python3.12/site-packages/_pytest/config/__init__.py:1441
  /usr/lib/python3.12/site-packages/_pytest/config/__init__.py:1441: PytestConfigWarning: Unknown config option: flake8-max-line-length

    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================================================================================== short test summary info ======================================================================================
FAILED tests/test_doc.py::test_year - AssertionError: assert '2020' == '2024'
============================================================================== 1 failed, 19 passed, 1 warning in 0.33s ==============================================================================

Regards!