-
Notifications
You must be signed in to change notification settings - Fork 145
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
1.6.6: pytest is failing #1242
Comments
So far as I can see, all the |
It's hard to say about |
Setting up [tkloczko@pers-jacek SPECS]$ rpm -E %pytest
\
ASMFLAGS="-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none";
CFLAGS="-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none";
CXXFLAGS="-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none";
FFLAGS="-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -I/usr/lib64/gfortran/modules";
FCFLAGS="-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -I/usr/lib64/gfortran/modules";
LDFLAGS="-Wl,--gc-sections -Wl,--as-needed -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1";
RUSTFLAGS="-C codegen-units=1 -C debuginfo=2 -C opt-level=2 -C link-arg=-fdata-sections -C link-arg=-ffunction-sections -C link-arg=-Wl,--as-needed -C link-arg=-Wl,-z,now -C link-arg=-Wl,-z,relro --cap-lints=warn" ;
VALAFLAGS="-g" ;
CC="/usr/bin/gcc"; CXX="/usr/bin/g++"; FC="/usr/bin/gfortran";
AR="/usr/bin/gcc-ar"; NM="/usr/bin/gcc-nm"; RANLIB="/usr/bin/gcc-ranlib";
export ASMFLAGS CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS VALAFLAGS CC CXX FC AR NM RANLIB RUSTFLAGS VALAFLAGS;
\
PATH=/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/bin:$PATH \
LD_LIBRARY_PATH=/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/lib64 \
PYTHONDONTWRITEBYTECODE=1 \
PDM_PEP517_SCM_VERSION=%{version} \
PBR_VERSION=%{version} \
SETUPTOOLS_SCM_PRETEND_VERSION=%{version} \
PYTHONPATH=${PYTHONPATH:-/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/%{NAME}-%{VERSION}-%{RELEASE}.x86_64/usr/lib/python3.8/site-packages} \
\
/usr/bin/pytest -ra -m "not network" Without setting that variable test suite execution overwrites what has been written by Just tested 1.6.7. Looks like in new version all fails are the same. |
Good point about affecting the environment potentially. This is not an issue when running tests normally (in tox) as it is all encapsulated. I think that would also explain Note that tox is the only way to run tests that is "official" and is the standard mode for our local development and all build and CI pipelines, which is reflected in prioritization of these issues. That said, the issue with the flag in particular might have an easy resolution if there's a different flag that could be passed to Python and then checked on the other end to ensure that argument passing to the interpreter works correctly; |
Just tested 1.6.7 and here is pytest summary output =========================== short test summary info ============================
SKIPPED [3] tests/debugpy/test_args.py:40: Shell expansion is not supported for "internalConsole"
SKIPPED [5] tests/debugpy/test_multiproc.py:48: https://github.com/microsoft/ptvsd/issues/1887
SKIPPED [3] tests/debugpy/test_multiproc.py:489: job objects are specific to Windows
SKIPPED [3] tests/debugpy/test_run.py:232: Skipped
FAILED tests/debugpy/test_gevent.py::test_gevent[program-launch]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_nodebug[module-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_nodebug[module-launch(console=externalTerminal)]
=========== 21 failed, 1183 passed, 14 skipped in 239.70s (0:03:59) ============ |
Gentle ping .. any update? Here is pytest output summary:=============================== warnings summary ===============================
../../../../../usr/lib/python3.9/site-packages/_pytest/fixtures.py:1314: 36 warnings
/usr/lib/python3.9/site-packages/_pytest/fixtures.py:1314: PytestRemovedIn9Warning: Marks applied to fixtures have no effect
See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
return fixture_marker(fixture_function)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [3] tests/debugpy/test_args.py:40: Shell expansion is not supported for "internalConsole"
SKIPPED [5] tests/debugpy/test_multiproc.py:48: https://github.com/microsoft/ptvsd/issues/1887
SKIPPED [3] tests/debugpy/test_multiproc.py:489: job objects are specific to Windows
SKIPPED [3] tests/debugpy/test_run.py:232: Skipped
SKIPPED [24] tests/debugpy/test_run.py:297: Frame-eval not available
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=integratedTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=externalTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=integratedTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=externalTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=internalConsole)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=integratedTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=internalConsole)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=externalTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=externalTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=integratedTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=externalTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=internalConsole)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=integratedTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=internalConsole)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=externalTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=internalConsole)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=integratedTerminal)]
ERROR tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_django.py::test_django_breakpoint_no_multiproc[launch-code]
FAILED tests/debugpy/test_gevent.py::test_gevent[program-launch]
FAILED tests/debugpy/test_numpy.py::test_ndarray[program-launch]
FAILED tests/debugpy/test_run.py::test_nodebug[module-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy,-O-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-None-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-pythonPath-custompy-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy-None-launch(console=externalTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-None-None-launch(console=integratedTerminal)]
FAILED tests/debugpy/test_run.py::test_custom_python_args[program-python-custompy,-O-None-launch(console=internalConsole)]
FAILED tests/debugpy/test_run.py::test_nodebug[module-launch(console=externalTerminal)]
FAILED tests/debugpy/test_django.py::test_django_exception_no_multiproc[launch-unhandled]
FAILED tests/debugpy/test_django.py::test_django_template_exception_no_multiproc[launch]
FAILED tests/debugpy/test_django.py::test_django_breakpoint_no_multiproc[launch-template]
FAILED tests/debugpy/test_django.py::test_django_breakpoint_multiproc[launch]
FAILED tests/debugpy/test_django.py::test_django_exception_no_multiproc[launch-handled]
= 28 failed, 1153 passed, 38 skipped, 36 warnings, 18 errors in 432.73s (0:07:12) = Full pytest log: python-debugpy.FAIL.txt |
FYI I've added all those units to pytest --deselect list assuming that it test suite and no0t actual module code issue. |
Just tested 1.8.5 and now pytest fails on collection units + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-debugpy-1.8.5-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-debugpy-1.8.5-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
ImportError while loading conftest '/home/tkloczko/rpmbuild/BUILD/debugpy-1.8.5/tests/conftest.py'.
tests/__init__.py:55: in <module>
import debugpy.server # noqa
../../BUILDROOT/python-debugpy-1.8.5-2.fc37.x86_64/usr/lib64/python3.10/site-packages/debugpy/server/__init__.py:7: in <module>
import debugpy._vendored.force_pydevd # noqa
../../BUILDROOT/python-debugpy-1.8.5-2.fc37.x86_64/usr/lib64/python3.10/site-packages/debugpy/_vendored/force_pydevd.py:44: in <module>
preimport('pydevd', [
../../BUILDROOT/python-debugpy-1.8.5-2.fc37.x86_64/usr/lib64/python3.10/site-packages/debugpy/_vendored/__init__.py:124: in preimport
import_module(name)
../../BUILDROOT/python-debugpy-1.8.5-2.fc37.x86_64/usr/lib64/python3.10/site-packages/debugpy/_vendored/pydevd/pydevd.py:93: in <module>
from _pydevd_bundle.pydevd_collect_bytecode_info import collect_try_except_info, collect_return_info, collect_try_except_info_from_source
E ImportError: cannot import name 'collect_try_except_info' from '_pydevd_bundle.pydevd_collect_bytecode_info' (/home/tkloczko/rpmbuild/BUILDROOT/python-debugpy-1.8.5-2.fc37.x86_64/usr/lib64/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py) |
Gentle ping .. any updates? |
I'm not sure what the error is. Are you attempting to run the tests for debugpy? I think you'd have to debug them yourself. |
Environment data
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)I'm assuming that probably still sometjing is missing in build env of that package however I was unable to figure out what exactly it could be. May I ask for help/some hints?
Here is pytest summary output:
Here is list of installed modules in build env
And hre is full pytest log python-debugpy.txt
The text was updated successfully, but these errors were encountered: