Closed yurivict closed 1 year ago
The tests are assuming the existence of an executable named "python" in the PATH. Perhaps it would be better to use sys.executable
. I seem to remember there was a reason I didn't do that in the first place, but I could also be imagining that.
I suppose there could also be a pre-test hook that checks to see if python
does exist on the PATH, and perhaps it checks the version, and maybe tries python3
if python
doesn't work.
I'm assuming you only have python3
on your system, and you aren't in a virtual environment? Can you check that if you you make a symlink python -> python3
if it works? Alternatively, can you try in a virtual environment?
I'm also not super worried about the singleton test server tests failing. The idea is to provide a local URL so the download tests don't need to rely on a network existing (which also makes them much faster). If they are causing issues even after the above test, then perhaps we just disable those on FreeBSD?
Indeed, the failures are gone with the python
symlink.
That's good to know. None of the library functions should depend on that, so you can remove that symlink and still expect the library to work. A fix to the test like I mentioned above should be a better more robust fix. If you feel like making a PR, I'd welcome the help, otherwise I'll get to it eventually.
I added the symlink to the FreeBSD port that exists only for the duration of build/test.
The version 1.2.2 has 1 failure:
========================================================================================== FAILURES ==========================================================================================
______________________________________________________________________________ test_import_of_editable_install _______________________________________________________________________________
def test_import_of_editable_install():
_check_skip_editable_module_tests()
import ubelt as ub
for PROJ in GLOBAL_PROJECTS:
result = ub.modname_to_modpath(PROJ.mod_name)
print(f'result={result}')
> assert result is not None
E assert None is not None
tests/test_editable_modules.py:454: AssertionError
----------------------------------------------------------------------------------- Captured stdout setup ------------------------------------------------------------------------------------
┌─── START CMD ───
[ubelt.cmd] yuri@yv.noip.me:~/ubelt-1.2.2$ /usr/local/bin/python3.9 -m pip install -e /disk-samsung/freebsd-ports/devel/py-ubelt/work-py39/.cache/ubelt/tests/demo_packages/purepy_src_demo_pkg_cpcivzce
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///disk-samsung/freebsd-ports/devel/py-ubelt/work-py39/.cache/ubelt/tests/demo_packages/purepy_src_demo_pkg_cpcivzce
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: packaging in /usr/local/lib/python3.9/site-packages (from purepy-src-demo-pkg-cpcivzce==1.0.0) (21.3)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.9/site-packages (from packaging->purepy-src-demo-pkg-cpcivzce==1.0.0) (3.0.9)
Building wheels for collected packages: purepy-src-demo-pkg-cpcivzce
Building editable for purepy-src-demo-pkg-cpcivzce (pyproject.toml): started
Building editable for purepy-src-demo-pkg-cpcivzce (pyproject.toml): finished with status 'done'
Created wheel for purepy-src-demo-pkg-cpcivzce: filename=purepy_src_demo_pkg_cpcivzce-1.0.0-0.editable-py3-none-any.whl size=1535 sha256=210b373169bc01f6ae5f18406fc5f3c6d9fbd17f8752150b696d77cf7451e6cd
Stored in directory: /tmp/pip-ephem-wheel-cache-jc9_pdjc/wheels/56/29/60/e07036ade44926c103a63b7bb54f3b1972295ed04bb0e24ab3
Successfully built purepy-src-demo-pkg-cpcivzce
Installing collected packages: purepy-src-demo-pkg-cpcivzce
Successfully installed purepy-src-demo-pkg-cpcivzce-1.0.0
└─── END CMD ───
┌─── START CMD ───
[ubelt.cmd] yuri@yv.noip.me:~/ubelt-1.2.2$ /usr/local/bin/python3.9 -m pip install -e /disk-samsung/freebsd-ports/devel/py-ubelt/work-py39/.cache/ubelt/tests/demo_packages/purepy_root_demo_pkg_cpcivzce
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///disk-samsung/freebsd-ports/devel/py-ubelt/work-py39/.cache/ubelt/tests/demo_packages/purepy_root_demo_pkg_cpcivzce
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: packaging in /usr/local/lib/python3.9/site-packages (from purepy-root-demo-pkg-cpcivzce==1.0.0) (21.3)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.9/site-packages (from packaging->purepy-root-demo-pkg-cpcivzce==1.0.0) (3.0.9)
Building wheels for collected packages: purepy-root-demo-pkg-cpcivzce
Building editable for purepy-root-demo-pkg-cpcivzce (pyproject.toml): started
Building editable for purepy-root-demo-pkg-cpcivzce (pyproject.toml): finished with status 'done'
Created wheel for purepy-root-demo-pkg-cpcivzce: filename=purepy_root_demo_pkg_cpcivzce-1.0.0-0.editable-py3-none-any.whl size=2715 sha256=1ac78260283967b6e6c430984edd6a276b2c9d4a97534e28ef795203869ed164
Stored in directory: /tmp/pip-ephem-wheel-cache-fqnhpbnw/wheels/d6/c1/72/ae8b121c9f6825194b11714f1fb6fa8bd4e6eaedfe65900379
Successfully built purepy-root-demo-pkg-cpcivzce
Installing collected packages: purepy-root-demo-pkg-cpcivzce
Successfully installed purepy-root-demo-pkg-cpcivzce-1.0.0
└─── END CMD ───
----------------------------------------------------------------------------------- Captured stderr setup ------------------------------------------------------------------------------------
WARNING: Error parsing requirements for hatch-vcs: [Errno 2] No such file or directory: '/usr/local/lib/python3.9/site-packages/hatch_vcs-0.2.0.dist-info/METADATA'
WARNING: Error parsing requirements for hatch-vcs: [Errno 2] No such file or directory: '/usr/local/lib/python3.9/site-packages/hatch_vcs-0.2.0.dist-info/METADATA'
------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------
result=None
---------------------------------------------------------------------------------- Captured stdout teardown ----------------------------------------------------------------------------------
┌─── START CMD ───
[ubelt.cmd] yuri@yv.noip.me:~/ubelt-1.2.2$ /usr/local/bin/python3.9 -m pip uninstall purepy_src_demo_pkg_cpcivzce -y
Found existing installation: purepy-src-demo-pkg-cpcivzce 1.0.0
Uninstalling purepy-src-demo-pkg-cpcivzce-1.0.0:
Successfully uninstalled purepy-src-demo-pkg-cpcivzce-1.0.0
└─── END CMD ───
┌─── START CMD ───
[ubelt.cmd] yuri@yv.noip.me:~/ubelt-1.2.2$ /usr/local/bin/python3.9 -m pip uninstall purepy_root_demo_pkg_cpcivzce -y
Found existing installation: purepy-root-demo-pkg-cpcivzce 1.0.0
Uninstalling purepy-root-demo-pkg-cpcivzce-1.0.0:
Successfully uninstalled purepy-root-demo-pkg-cpcivzce-1.0.0
└─── END CMD ───
====================================================================================== warnings summary ======================================================================================
../../../../../../usr/local/lib/python3.9/site-packages/pytest_asyncio/plugin.py:191
/usr/local/lib/python3.9/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ===================================================================================
SKIPPED [1] tests/test_download.py:256: This takes a long time to timeout and I dont understand why
SKIPPED [1] tests/test_futures.py:42: long test, demos that timeout does not work with SerialExecutor
SKIPPED [1] tests/test_hash.py:435: blake3 is not available
SKIPPED [1] tests/test_path.py:26: pathlib is not installed
==================================================================== 1 failed, 188 passed, 4 skipped, 1 warning in 43.01s ====================================================================
Python-3.9 FreeBSD 13.1
Describe the bug
Expected behavior A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.