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

1.7: pytest fails in two units with TypeError: Can't instantiate abstract class DBusSpawnedTestCase with abstract methods _get_message_bus, _get_service error #128

Open
kloczek opened this issue May 26, 2024 · 0 comments

Comments

@kloczek
Copy link

kloczek commented May 26, 2024

Looks like something is wrong and pytest fails in two units with pytest 8.2.1

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-dasbus-1.7-7.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-dasbus-1.7-7.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.2.1, pluggy-1.5.0 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/tkloczko/rpmbuild/BUILD/dasbus-1.7/.hypothesis/examples'))
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/dasbus-1.7
configfile: pyproject.toml
testpaths: tests
plugins: hypothesis-6.100.0, benchmark-4.0.0, mock-3.14.0, timeout-2.3.1, twisted-1.14.1, tornasync-0.6.0.post2, trio-0.8.0, anyio-4.3.0, asyncio-0.23.7
asyncio: mode=strict
collected 232 items / 5 errors

========================================================================================== ERRORS ===========================================================================================
____________________________________________________________________________ ERROR collecting tests/lib_dbus.py _____________________________________________________________________________
/usr/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.10/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.10/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class AbstractDBusTestCase with abstract methods _get_message_bus, _get_service
____________________________________________________________________________ ERROR collecting tests/lib_dbus.py _____________________________________________________________________________
/usr/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.10/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.10/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class DBusThreadedTestCase with abstract methods _get_message_bus, _get_service
____________________________________________________________________________ ERROR collecting tests/lib_dbus.py _____________________________________________________________________________
/usr/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.10/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.10/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class DBusSpawnedTestCase with abstract methods _get_message_bus, _get_service
____________________________________________________________________________ ERROR collecting tests/test_dbus.py ____________________________________________________________________________
/usr/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.10/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.10/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class DBusThreadedTestCase with abstract methods _get_message_bus, _get_service
____________________________________________________________________________ ERROR collecting tests/test_unix.py ____________________________________________________________________________
/usr/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.10/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.10/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.10/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class DBusSpawnedTestCase with abstract methods _get_message_bus, _get_service
================================================================================== short test summary info ==================================================================================
ERROR tests/lib_dbus.py::AbstractDBusTestCase - TypeError: Can't instantiate abstract class AbstractDBusTestCase with abstract methods _get_message_bus, _get_service
ERROR tests/lib_dbus.py::DBusThreadedTestCase - TypeError: Can't instantiate abstract class DBusThreadedTestCase with abstract methods _get_message_bus, _get_service
ERROR tests/lib_dbus.py::DBusSpawnedTestCase - TypeError: Can't instantiate abstract class DBusSpawnedTestCase with abstract methods _get_message_bus, _get_service
ERROR tests/test_dbus.py::DBusThreadedTestCase - TypeError: Can't instantiate abstract class DBusThreadedTestCase with abstract methods _get_message_bus, _get_service
ERROR tests/test_unix.py::DBusSpawnedTestCase - TypeError: Can't instantiate abstract class DBusSpawnedTestCase with abstract methods _get_message_bus, _get_service
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 5 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 5 errors in 0.53s =====================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant