-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7 tests fail #266
Comments
This is probably due to customizations in |
I got setup with a FreeBSD virtual machine, and I'm running into a different issue about: No module found named After I logged into a fresh install I can the following commands: pkg update
pkg install git
pkg install py39-pip
git clone https://github.com/pyutils/line_profiler.git
cd line_profiler
pip install -e .[tests-strict]
pytest Do you have any recommendations for how to setup a machine and run tests so I can reproduce this issue? |
I have these instructions on file:
You can begin from step 4 above. The sqlite module is usually bundled with Python on Linux, but not on FreeBSD. |
Working through this slowly. One recommendation I'll make is to update the instructions for git clone to: I'm also noticing that several of the steps have interactive components, e.g. I get prompts like: Is there an adjustment to the above commands to execute them non-interactively, so I can script this? As an aside: I'm finding it valuable to perform debugging by forwarding a local port to the VM and then ssh-ing into the VM to execute these tasks rather than work with the virtualbox frontend. |
The ===> Returning to build of py39-line-profiler-4.1.3
===> py39-line-profiler-4.1.3 depends on package: py39-pytest>=7,1 - found
===> py39-line-profiler-4.1.3 depends on file: /usr/local/bin/python3.9 - found
cd /usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3 && /usr/bin/env -i HOME=/usr/ports/devel/py-line-profiler/work-py39 PWD="${PWD}" __MAKE_CONF=/nonexistent OSVERSION=1400097 PATH=/usr/ports/devel/py-line-profiler/work-py39/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin TERM=tmux-256color XDG_DATA_HOME=/usr/ports/devel/py-line-profiler/work-py39 XDG_CONFIG_HOME=/usr/ports/devel/py-line-profiler/work-py39 XDG_CACHE_HOME=/usr/ports/devel/py-line-profiler/work-py39/.cache HOME=/usr/ports/devel/py-line-profiler/work-py39 PATH=/usr/ports/devel/py-line-profiler/work-py39/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/usr/ports/devel/py-line-profiler/work-py39/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" PYTHONPATH=/usr/ports/devel/py-line-profiler/work-py39/stage/usr/local/lib/python3.9/site-packages /usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts=
=============================================================================== test session starts ================================================================================
platform freebsd14 -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
rootdir: /usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3
configfile: pyproject.toml
plugins: xdoctest-1.1.3, cov-3.0.0
collected 34 items
tests/test_assumptions.py::test_assumed_noop PASSED [ 2%]
tests/test_autoprofile.py::test_single_function_autoprofile PASSED [ 5%]
tests/test_autoprofile.py::test_multi_function_autoprofile PASSED [ 8%]
tests/test_autoprofile.py::test_duplicate_function_autoprofile PASSED [ 11%]
tests/test_autoprofile.py::test_autoprofile_script_with_module PASSED [ 14%]
tests/test_autoprofile.py::test_autoprofile_module PASSED [ 17%]
tests/test_autoprofile.py::test_autoprofile_module_list PASSED [ 20%]
tests/test_autoprofile.py::test_autoprofile_module_with_prof_imports PASSED [ 23%]
tests/test_autoprofile.py::test_autoprofile_script_with_prof_imports PASSED [ 26%]
tests/test_cli.py::test_cli PASSED [ 29%]
tests/test_cli.py::test_version_agreement PASSED [ 32%]
tests/test_complex_case.py::test_complex_example_python_none PASSED [ 35%]
tests/test_complex_case.py::test_varied_complex_invocations PASSED [ 38%]
tests/test_duplicate_functions.py::test_duplicate_function PASSED [ 41%]
tests/test_explicit_profile.py::test_simple_explicit_nonglobal_usage PASSED [ 44%]
tests/test_explicit_profile.py::test_explicit_profile_with_nothing PASSED [ 47%]
tests/test_explicit_profile.py::test_explicit_profile_with_environ_on PASSED [ 50%]
tests/test_explicit_profile.py::test_explicit_profile_with_environ_off PASSED [ 52%]
tests/test_explicit_profile.py::test_explicit_profile_with_cmdline PASSED [ 55%]
tests/test_explicit_profile.py::test_explicit_profile_with_kernprof PASSED [ 58%]
tests/test_explicit_profile.py::test_explicit_profile_with_in_code_enable PASSED [ 61%]
tests/test_explicit_profile.py::test_explicit_profile_with_duplicate_functions PASSED [ 64%]
tests/test_import.py::test_import PASSED [ 67%]
tests/test_import.py::test_version PASSED [ 70%]
tests/test_ipython.py::TestIPython::test_init PASSED [ 73%]
tests/test_kernprof.py::TestKernprof::test_enable_disable PASSED [ 76%]
tests/test_kernprof.py::TestKernprof::test_function_decorator PASSED [ 79%]
tests/test_kernprof.py::TestKernprof::test_gen_decorator PASSED [ 82%]
tests/test_line_profiler.py::test_init PASSED [ 85%]
tests/test_line_profiler.py::test_enable_disable PASSED [ 88%]
tests/test_line_profiler.py::test_function_decorator PASSED [ 91%]
tests/test_line_profiler.py::test_gen_decorator PASSED [ 94%]
tests/test_line_profiler.py::test_classmethod_decorator PASSED [ 97%]
tests/test_line_profiler.py::test_show_func_column_formatting PASSED [100%]
================================================================================ 34 passed in 3.25s ================================================================================ In your error report, I can't see why tests are failing. Getting stdout or pytest reasons for why the test fail would be helpful. Also, I'm not sure why coverage is running if the tests just invoke pytest. The custom A difference I see between your run and my run is that the pytest plugins are different. You have: platform freebsd14 -- Python 3.9.18, pytest-7.4.4, pluggy-1.4.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3/.hypothesis/examples'))
rootdir: /usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3
configfile: pyproject.toml
plugins: anyio-4.3.0, checkdocs-2.12.0, xdoctest-1.1.3, typeguard-4.2.1, hypothesis-6.98.18, enabler-3.1.1, cov-4.1.0, xdist-3.5.0
4 workers [29 items] error
scheduling tests via LoadScheduling Whereas mine is: platform freebsd14 -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
rootdir: /usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3
configfile: pyproject.toml
plugins: xdoctest-1.1.3, cov-3.0.0
collected 34 items My pytest version is also different. Is there a modification to the above commands that could more faithfully reproduce your build environment? |
I attempted to reproduce the versions via: /usr/local/bin/python3.9 -m pip uninstall pytest
/usr/local/bin/python3.9 -m pip uninstall pytest
pip install "pytest==7.4.4"
pip install anyio
pip install "pytest-checkdocs==2.12.0"
pip install "pytest==7.4.4"
pip install "typeguard==4.2.1"
pip install "hypothesis==6.98.18"
pip install "pytest-cov==4.1.0"
pip install "pytest-enabler==3.1.1" "pytest-xdist==3.5.0"
/usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts= which resulted in root@foobar:/usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3 # /usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts=
=============================================================================== test session starts ================================================================================
platform freebsd14 -- Python 3.9.18, pytest-7.4.4, pluggy-1.4.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3/.hypothesis/examples'))
rootdir: /usr/ports/devel/py-line-profiler/work-py39/line_profiler-4.1.3
configfile: pyproject.toml
plugins: xdoctest-1.1.3, cov-4.1.0, anyio-4.3.0, typeguard-4.2.1, hypothesis-6.98.18, enabler-3.1.1, xdist-3.5.0, checkdocs-2.12.0
8 workers [35 items]
scheduling tests via LoadScheduling
... omitted for clarity ...
INTERNALERROR> coverage.exceptions.DataError: Can't combine arc data with line data
================================================================================ 35 passed in 5.63s ================================================================================ So I was able to reproduce the coverage issue, but all 34 tests are still passing just fine for me. I'd be interested in seeing what the result of this command is on your system:
The important parts being change |
Version: 4.1.3
Python-3.9
FreeBSD 14.0
The text was updated successfully, but these errors were encountered: