0.9.11: pytest fails
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
- because I'm calling
build
with--no-isolation
I'm using during all processes only locally installed modules - install .whl file in </install/prefix> using
installer
module - run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
- build is performed in env which is
cut off from access to the public network
(pytest is executed with-m "not network"
)
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/dogtail-0.9.11
collected 14 items / 6 errors
========================================================================================== ERRORS ===========================================================================================
__________________________________________________________________________ ERROR collecting tests/test_logging.py ___________________________________________________________________________
tests/test_logging.py:4: in <module>
import dogtail.tree
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/tree.py:6: in <module>
from dogtail import rawinput
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/rawinput.py:4: in <module>
from dogtail.utils import doDelay
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/utils.py:12: in <module>
gi.require_version('Gtk', '3.0')
/usr/lib64/python3.9/site-packages/gi/__init__.py:122: in require_version
raise ValueError('Namespace %s not available' % namespace)
E ValueError: Namespace Gtk not available
_________________________________________________________________________ ERROR collecting tests/test_predicate.py __________________________________________________________________________
tests/test_predicate.py:5: in <module>
import dogtail.tree
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/tree.py:6: in <module>
from dogtail import rawinput
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/rawinput.py:4: in <module>
from dogtail.utils import doDelay
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/utils.py:12: in <module>
gi.require_version('Gtk', '3.0')
/usr/lib64/python3.9/site-packages/gi/__init__.py:122: in require_version
raise ValueError('Namespace %s not available' % namespace)
E ValueError: Namespace Gtk not available
_________________________________________________________________________ ERROR collecting tests/test_procedural.py _________________________________________________________________________
tests/test_procedural.py:3: in <module>
from dogtail.procedural import focus, keyCombo, deselect, activate, select, click, tree, FocusError, run, config, type
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/procedural.py:5: in <module>
from dogtail import rawinput
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/rawinput.py:4: in <module>
from dogtail.utils import doDelay
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/utils.py:12: in <module>
gi.require_version('Gtk', '3.0')
/usr/lib64/python3.9/site-packages/gi/__init__.py:122: in require_version
raise ValueError('Namespace %s not available' % namespace)
E ValueError: Namespace Gtk not available
__________________________________________________________________________ ERROR collecting tests/test_rawinput.py __________________________________________________________________________
tests/test_rawinput.py:7: in <module>
from dogtail.rawinput import absoluteMotion, relativeMotion, doubleClick, press, drag, dragWithTrajectory, \
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/rawinput.py:4: in <module>
from dogtail.utils import doDelay
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/utils.py:12: in <module>
gi.require_version('Gtk', '3.0')
/usr/lib64/python3.9/site-packages/gi/__init__.py:122: in require_version
raise ValueError('Namespace %s not available' % namespace)
E ValueError: Namespace Gtk not available
____________________________________________________________________________ ERROR collecting tests/test_tree.py ____________________________________________________________________________
tests/test_tree.py:6: in <module>
import dogtail.tree
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/tree.py:6: in <module>
from dogtail import rawinput
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/rawinput.py:4: in <module>
from dogtail.utils import doDelay
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/utils.py:12: in <module>
gi.require_version('Gtk', '3.0')
/usr/lib64/python3.9/site-packages/gi/__init__.py:122: in require_version
raise ValueError('Namespace %s not available' % namespace)
E ValueError: Namespace Gtk not available
___________________________________________________________________________ ERROR collecting tests/test_utils.py ____________________________________________________________________________
tests/test_utils.py:5: in <module>
import dogtail.tree
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/tree.py:6: in <module>
from dogtail import rawinput
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/rawinput.py:4: in <module>
from dogtail.utils import doDelay
../../BUILDROOT/python-dogtail-0.9.11-19.fc36.x86_64/usr/lib/python3.9/site-packages/dogtail/utils.py:12: in <module>
gi.require_version('Gtk', '3.0')
/usr/lib64/python3.9/site-packages/gi/__init__.py:122: in require_version
raise ValueError('Namespace %s not available' % namespace)
E ValueError: Namespace Gtk not available
================================================================================== short test summary info ==================================================================================
ERROR tests/test_logging.py - ValueError: Namespace Gtk not available
ERROR tests/test_predicate.py - ValueError: Namespace Gtk not available
ERROR tests/test_procedural.py - ValueError: Namespace Gtk not available
ERROR tests/test_rawinput.py - ValueError: Namespace Gtk not available
ERROR tests/test_tree.py - ValueError: Namespace Gtk not available
ERROR tests/test_utils.py - ValueError: Namespace Gtk not available
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 6 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 6 errors in 0.41s =====================================================================================
List of installed modules in build env:
Package Version
------------------ -----------
build 1.1.1
distro 1.9.0
dnf 4.19.0
exceptiongroup 1.1.3
gpg 1.23.2
importlib_metadata 7.0.1
iniconfig 2.0.0
installer 0.7.0
libdnf 0.73.0
packaging 24.0
pluggy 1.4.0
pycairo 1.26.0
PyGObject 3.48.1
pyproject_hooks 1.0.0
pytest 8.1.1
python-dateutil 2.9.0.post0
setuptools 69.1.1
tokenize_rt 5.2.0
tomli 2.0.1
wheel 0.43.0
zipp 3.17.0
Please let me know if you need more details or want me to perform some diagnostics.