Skip to content
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

INTERNALERROR during tests #418

Closed
yurivict opened this issue Mar 29, 2023 · 2 comments
Closed

INTERNALERROR during tests #418

yurivict opened this issue Mar 29, 2023 · 2 comments

Comments

@yurivict
Copy link

Tests fail:

cd /usr/ports/devel/py-QtPy/work-py39/QtPy-2.3.1 && /usr/bin/env XDG_DATA_HOME=/usr/ports/devel/py-QtPy/work-py39  XDG_CONFIG_HOME=/usr/ports/devel/py-QtPy/work-py39  XDG_CACHE_HOME=/usr/ports/devel/py-QtPy/work-py39/.cache  HOME=/usr/ports/devel/py-QtPy/work-py39 PATH=/usr/local/libexec/ccache:/usr/ports/devel/py-QtPy/work-py39/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/usr/ports/devel/py-QtPy/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 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  "  MANPREFIX="/usr/local" CCACHE_DIR="/tmp/.ccache" 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" /usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts= 
/usr/local/lib/python3.9/site-packages/pytestqt/logging.py:42: PytestDeprecationWarning: The hookimpl QtLoggingPlugin.pytest_runtest_makereport uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(hookwrapper=True) decorator instead
 to configure the hooks.
 See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
  @pytest.mark.hookwrapper
========================================================================================== test session starts ==========================================================================================
platform freebsd13 -- Python 3.9.16, pytest-7.2.1, pluggy-1.0.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/usr/ports/devel/py-QtPy/work-py39/QtPy-2.3.1/.hypothesis/examples')
Using --randomly-seed=1870392973
PySide2 5.15.2 -- Qt runtime 5.15.8 -- Qt compiled 5.15.8
rootdir: /usr/ports/devel/py-QtPy/work-py39/QtPy-2.3.1, configfile: pytest.ini, testpaths: qtpy/tests
plugins: forked-1.4.0, hypothesis-6.68.2, mypy-plugins-1.10.1, cov-2.9.0, randomly-3.12.0, timeout-2.1.0, rerunfailures-10.1, flaky-3.7.0, xdist-2.5.0, env-0.6.2, freezegun-0.4.2, mock-3.10.0, flake8-1.1.1, typeguard-3.0.2, qt-4.1.0
collected 105 items / 1 skipped                                                                                                                                                                         
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 323, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 334, in pytest_collection
INTERNALERROR>     session.perform_collect()
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 667, in perform_collect
INTERNALERROR>     hook.pytest_collection_modifyitems(
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pytest_freezegun.py", line 55, in pytest_collection_modifyitems
INTERNALERROR>     if get_closest_marker(item, MARKER_NAME):
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pytest_freezegun.py", line 17, in get_closest_marker
INTERNALERROR>     if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'):
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/version.py", line 55, in __init__
INTERNALERROR>     warnings.warn(
INTERNALERROR> DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

========================================================================================== 1 skipped in 1.84s ===========================================================================================
*** Error code 3

Version: 2.3.1
Python-3.9
FreeBSD 13.1

@ccordoba12
Copy link
Member

ccordoba12 commented Mar 29, 2023

This is an error in Pytest, not in QtPy. Since you already opened an issue there, I'm going to close this one.

In addition, if you're a FreeBSD package maintainer, I'd suggest you to not waste other maintainers time in the future with errors that don't apply to their packages, which would have been quite easy to spot in this case if you had simply read the traceback above, instead of opening issues in two unrelated projects (i.e. CPython and here).

@ccordoba12 ccordoba12 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
@CAM-Gerlach
Copy link
Member

It turns out it was actually an error in an unmaintained third-party Pytest plugin (pytest-freezegun) that they happened to have installed in the same environment in which they were running the QtPy test suite, which can be solved by either running the QtPy tests in a clean environment, or uninstalling that plugin and replacing it with its modern maintained replacement, pytest-freezer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants