Package Details: python-xvfbwrapper 0.2.9-11

Git Clone URL: https://aur.archlinux.org/python-xvfbwrapper.git (read-only, click to copy)
Package Base: python-xvfbwrapper
Description: Manage headless displays with Xvfb (X virtual framebuffer)
Upstream URL: https://github.com/cgoldberg/xvfbwrapper
Licenses: MIT
Submitter: jelly
Maintainer: carsme
Last Packager: carsme
Votes: 2
Popularity: 0.29
First Submitted: 2024-01-07 12:27 (UTC)
Last Updated: 2024-01-29 09:06 (UTC)

Latest Comments

HLFH commented on 2024-02-12 12:11 (UTC)

Please bump pkgrel to 12 for the package to build correctly and the check() function to work.

carsme commented on 2024-02-11 10:24 (UTC)

@HLFH I cannot reproduce this either, please try building in a chroot.

HLFH commented on 2024-02-11 09:00 (UTC)

Successfully built xvfbwrapper-0.2.9-py3-none-any.whl
==> Lancement de check()…
============================================================= test session starts ==============================================================
platform linux -- Python 3.11.7, pytest-7.4.4, pluggy-1.4.0
rootdir: /tmp/makepkg/python-xvfbwrapper/src/xvfbwrapper-0.2.9
plugins: httpbin-2.0.0, flask-1.3.0, anyio-4.2.0, trio-0.8.0, hypothesis-6.98.2, asyncio-0.23.4
asyncio: mode=Mode.STRICT
collected 9 items                                                                                                                              

test_xvfb.py ...F.....                                                                                                                   [100%]

=================================================================== FAILURES ===================================================================
________________________________________________ TestXvfb.test_start_fails_with_unknown_kwargs _________________________________________________

self = <test_xvfb.TestXvfb testMethod=test_start_fails_with_unknown_kwargs>

    def test_start_fails_with_unknown_kwargs(self):
        xvfb = Xvfb(foo='bar')
>       with self.assertRaises(RuntimeError):
E       AssertionError: RuntimeError not raised

test_xvfb.py:88: AssertionError
=========================================================== short test summary info ============================================================
FAILED test_xvfb.py::TestXvfb::test_start_fails_with_unknown_kwargs - AssertionError: RuntimeError not raised
========================================================= 1 failed, 8 passed in 3.04s ==========================================================
==> ERREUR : Une erreur s’est produite dans check().
    Abandon…

La commande 'sudo --user=#1000 --preserve-env=EDITOR -- makepkg --force' a échoué.

carsme commented on 2024-01-31 08:26 (UTC)

@dreieck Unfortunately, I cannot reproduce this, neither on my system or in a chroot. Can you try building in a chroot and see if it fails there as well?

dreieck commented on 2024-01-30 09:09 (UTC) (edited on 2024-01-30 09:11 (UTC) by dreieck)

check() fails for me with
AttributeError: 'Xvfb' object has no attribute '_lock_display_file'
and
KeyError: '__warningregistry__':

==> Starting check()...
======================================================================================== test session starts ========================================================================================
platform linux -- Python 3.11.6, pytest-8.0.0, pluggy-1.4.0
Deltachat core=v1.131.4 sqlite=3.39.4 journal_mode=wal
rootdir: /tmp/makepkg/build/python-xvfbwrapper/src/xvfbwrapper-0.2.9
plugins: deltachat-1.131.4, typeguard-4.1.5, anyio-4.2.0, cov-4.1.0
collected 9 items                                                                                                                                                                                   

test_xvfb.py .FE.......                                                                                                                                                                       [100%]

============================================================================================== ERRORS ===============================================================================================
__________________________________________________________ ERROR at teardown of TestXvfb.test_get_next_unused_display_does_not_reuse_lock ___________________________________________________________

self = <xvfbwrapper.Xvfb object at 0x732945178990>

    def _cleanup_lock_file(self):
        '''
        This should always get called if the process exits safely
        with Xvfb.stop() (whether called explicitly, or by __exit__).

        If you are ending up with /tmp/X123-lock files when Xvfb is not
        running, then Xvfb is not exiting cleanly. Always either call
        Xvfb.stop() in a finally block, or use Xvfb as a context manager
        to ensure lock files are purged.

        '''
>       self._lock_display_file.close()
E       AttributeError: 'Xvfb' object has no attribute '_lock_display_file'

xvfbwrapper.py:108: AttributeError
============================================================================================= FAILURES ==============================================================================================
_____________________________________________________________________ TestXvfb.test_get_next_unused_display_does_not_reuse_lock _____________________________________________________________________

self = <test_xvfb.TestXvfb testMethod=test_get_next_unused_display_does_not_reuse_lock>

    def test_get_next_unused_display_does_not_reuse_lock(self):
        xvfb = Xvfb()
        xvfb2 = Xvfb()
        xvfb3 = Xvfb()
        self.addCleanup(xvfb._cleanup_lock_file)
        self.addCleanup(xvfb2._cleanup_lock_file)
        self.addCleanup(xvfb3._cleanup_lock_file)
        side_effect = [11, 11, 22, 11, 22, 11, 22, 22, 22, 33]
        with patch('xvfbwrapper.randint',
                   side_effect=side_effect) as mockrandint:
            self.assertEqual(xvfb._get_next_unused_display(), 11)
            self.assertEqual(mockrandint.call_count, 1)
            if sys.version_info >= (3, 2):
>               with self.assertWarns(ResourceWarning):

test_xvfb.py:104: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = '__warningregistry__'

    def __getattr__(name: str) -> Any:
        if name.startswith("DC_"):
            return getattr(lib, name)
>       return globals()[name]
E       KeyError: '__warningregistry__'

/usr/lib/python3.11/site-packages/deltachat/const.py:9: KeyError
====================================================================================== short test summary info ======================================================================================
FAILED test_xvfb.py::TestXvfb::test_get_next_unused_display_does_not_reuse_lock - KeyError: '__warningregistry__'
ERROR test_xvfb.py::TestXvfb::test_get_next_unused_display_does_not_reuse_lock - AttributeError: 'Xvfb' object has no attribute '_lock_display_file'
=============================================================================== 1 failed, 8 passed, 1 error in 0.83s ================================================================================
==> ERROR: A failure occurred in check().

Regards!