pytest-dev / py

Python development support library (note: maintenance only)
MIT License
67 stars 105 forks source link

1.11.0: pytest is failing #281

Closed kloczek closed 2 years ago

kloczek commented 2 years ago

I'm trying to package 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.

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-py-1.11.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-py-1.11.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/py-1.11.0, configfile: tox.ini, testpaths: testing
collected 832 items / 1 error / 831 selected
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 269, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 322, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 333, in pytest_collection
INTERNALERROR>     session.perform_collect()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 636, in perform_collect
INTERNALERROR>     self.config.pluginmanager.check_pending()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 262, in check_pending
INTERNALERROR>     raise PluginValidationError(
INTERNALERROR> pluggy._manager.PluginValidationError: unknown hook 'pytest_funcarg__repowc1' in plugin <module 'conftest' from '/home/tkloczko/rpmbuild/BUILD/py-1.11.0/testing/path/conftest.py'>

======================================================================= 6 warnings, 1 error in 1.76s =======================================================================
RonnyPfannschmidt commented 2 years ago

expected failure

kloczek commented 2 years ago

Does it mean that it know bug, or some kind feature which needs some adaptation in other modules? 🤔

RonnyPfannschmidt commented 2 years ago

its a known breakage - pylib wl not adopt to be testable on modern pytest, its going to be phased out

kloczek commented 2 years ago

OK now it is clear. Thx 😄

kloczek commented 2 years ago

This issue is now affecting probably +10 other modules test suite. Ronny may I ask you tall few words what needa to be done to get rid of that and/or is irt any working solution for that issue? Did I push some updates in my packaged modules to far? 🤔

RonnyPfannschmidt commented 2 years ago

Basically someone would have to forward port the testsuite of pylib to use modern fixtures instead of the initial fixture mechanism,

Currently I'm not aware of anyone wanting to work on that

Im also unlikely to Touch this in a meaningful way anytime soon

As pytest is preparing to completely shed itself from pylib in the mid term future, it's likely that a fix won't happen as it's currently looking like a painful amount of thankless and low value wortk

I understand the pain of not being able to verify a dependency

The-Compiler commented 2 years ago

I don't understand how pylib's selftests failing would affect other projects.

kloczek commented 2 years ago

There are more than few modules affected by that issue. Just found for example that on update unicoirn to 0.17.1 pytest is failing with the same internal error 😞

The-Compiler commented 2 years ago

I doubt unicorn uses an internal conftest.py from pylib's selftest. You are likely looking at a different error.