datalad / datalad-next

DataLad extension for new functionality and improved user experience
https://datalad.org
Other
7 stars 8 forks source link

datalad-core's `test_wtf` fails on `main` #734

Closed mih closed 1 month ago

mih commented 3 months ago

From https://ci.appveyor.com/project/mih/datalad-next/build/job/l1hyhxx7pbl4etmx

../../../venv3.8.17/lib/python3.8/site-packages/datalad/local/tests/test_wtf.py:84: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
first = 'max_pathlength:'
second = '# WTF\n## configuration \n  - annex.security.allowed-http-addresses: all\n  - annex.security.allowed-url-schemes: htt...x\n  - release: 5.15.0-1057-azure\n  - type: posix\n  - version: #65~20.04.1-Ubuntu SMP Mon Feb 12 17:26:40 UTC 2024\n'
msg = None
    def assert_in(first, second, msg=None):
        if msg is None:
>           assert first in second
E           AssertionError
../../../venv3.8.17/lib/python3.8/site-packages/datalad/tests/utils_pytest.py:104: AssertionError

This is with datalad-1.1.0. Locally (on -next v1.5, also with datalad 1.1.0) I do not see this.

christian-monch commented 3 months ago

I opened PR datalad #7628 which should fix the problem.

The faulty code (which has resided in test_wtf for 2 years) is only triggered if psutil is installed (depending on the datalad-version the error is triggered by different versions of psutil).

adswa commented 2 months ago

Just to keep a record somewhere, the mentioned PR didn't land in core, but https://github.com/datalad/datalad/pull/7622 did, which disables the wtf tests whenever psutil is version 6.0.0 or higher (as it stopped reporting on maxpath from this version onward).

adswa commented 1 month ago

https://github.com/datalad/datalad-next/pull/751 has been merged, too. I'm closing this.