pytest-dev / py

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

Errors with pytest 3 #104

Closed thmo closed 1 year ago

thmo commented 7 years ago

Running pylib's testsuite with pytest 3.0.5 shows some errors and warnings, see attached log.

testlog.txt

RonnyPfannschmidt commented 7 years ago

this is a known issue, currently the testsuite of pylib is not compatible with pytest 3 due to assumptions wrt the cloned/moved py.code parts

RonnyPfannschmidt commented 7 years ago

@nicoddemus i#ll leave all decissions regarding this one to you ^^

RonnyPfannschmidt commented 7 years ago

i did one change if disabling the broken tests for pytest 3.1

they still break for pytest 3.1 and nothing is done about the incorrectness

nicoddemus commented 7 years ago

A quick look seems like we should be able to change the tests themselves... or even better, we can just skip everything under testing/code because it is officially no longer maintained.

gaborbernat commented 6 years ago

I've ran into this myself today, any plans to solve this?

nicoddemus commented 6 years ago

I think the only reasonable correction would be to drop testing with pytest < 3; we need to change a few tests so they are compatible with pytest >= 3, and I don't think it is worthwhile to maintain two versions of tests.

gaborbernat commented 6 years ago
  py27-pytest29: commands succeeded
  py27-pytest30: commands succeeded
ERROR:   py27-pytest31: commands failed
  py34-pytest29: commands succeeded
  py34-pytest30: commands succeeded
ERROR:   py34-pytest31: commands failed
  py35-pytest29: commands succeeded
  py35-pytest30: commands succeeded
ERROR:   py35-pytest31: commands failed
  py36-pytest29: commands succeeded
  py36-pytest30: commands succeeded
ERROR:   py36-pytest31: commands failed

Here's what I have at the moment. This sort of enforces me to install an old version of PyTest to test this, which is not easy in a DPKG driven environment.

kloczek commented 3 years ago

Just tested1.10.0 and looks like test suite still is failing. Python pytest 6.2.1.

+ cd py-1.10.0
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-py-1.10.0-2.fc34.x86_64/usr/lib/python3.8/site-packages
+ py.test -r s -k-TestWCSvnCommandPath testing
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.3, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/py-1.10.0/.hypothesis/examples')
rootdir: /home/tkloczko/rpmbuild/BUILD/py-1.10.0, configfile: tox.ini, testpaths: testing
plugins: hypothesis-4.23.8, flaky-3.6.1, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, cov-2.10.1, xdist-2.2.0
collected 831 items / 1 error / 830 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 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 187, 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 274, 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.10.0/testing/path/conftest.py'>

======================================================================= 3 warnings, 1 error in 0.95s =======================================================================
error: Bad exit status from /var/tmp/rpm-tmp.E8za0V (%check)
nicoddemus commented 3 years ago

Hi @kloczek, indeed nobody dedicated time to fix this yet.