Failed test log added as a gist:  
https://gist.github.com/Nyslay/9ee08a02c6bd3a1c7f7d9216007b38fe
poniedziaƂek, 9 sierpnia 2021 o 23:28:48 UTC+2 Dawid Respondek napisaƂ(a):

> Hi, I'm trying to create .rpm package for openSUSE distro using openSUSE 
> Build Service, but my package fail to pass pytest. 
> Most of issue I already fixed, but for this one I cant find solution.
> OBS build: Show home:nyslay:branches:X11:windowmanagers / qtile - 
> openSUSE Build Service 
> <https://build.opensuse.org/package/show/home:nyslay:branches:X11:windowmanagers/qtile>
> Test logs below:
>
> =================================== FAILURES 
> =================================== [ 284s] ______________________ 
> test_update_available_with_execute ______________________ [ 284s] [ 284s] 
> manager_nospawn = <test.conftest.TestManager object at 0x7fb82e05bc40> [ 
> 284s] minimal_conf_noscreen = <class 
> 'test.widgets.conftest.minimal_conf_noscreen.<locals>.MinimalConf'> [ 284s] 
> monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fb82e05b0d0> [ 
> 284s] [ 284s] def test_update_available_with_execute(manager_nospawn, 
> minimal_conf_noscreen, monkeypatch): [ 284s] """ test polling after 
> executing command """ [ 284s] [ 284s] # Use monkeypatching to patch both 
> Popen (for execute command) and call_process [ 284s] [ 284s] # This class 
> returns None when first polled (to simulate that the task is still running) 
> [ 284s] # and then 0 on the second call. [ 284s] class MockPopen: [ 284s] 
> def __init__(self, *args, **kwargs): [ 284s] self.call_count = 0 [ 284s] [ 
> 284s] def poll(self): [ 284s] if self.call_count == 0: [ 284s] 
> self.call_count += 1 [ 284s] return None [ 284s] return 0 [ 284s] [ 284s] # 
> Bit of an ugly hack to replicate the above functionality but for a method. 
> [ 284s] class MockSpawn: [ 284s] call_count = 0 [ 284s] [ 284s] 
> @classmethod [ 284s] def call_process(cls, *args, **kwargs): [ 284s] if 
> cls.call_count == 0: [ 284s] cls.call_count += 1 [ 284s] return "Updates" [ 
> 284s] return "" [ 284s] [ 284s] cu6 = CheckUpdates(distro=good_distro, [ 
> 284s] custom_command="dummy", [ 284s] execute="dummy", [ 284s] 
> no_update_string=nus, [ 284s] ) [ 284s] [ 284s] # Patch the necessary 
> object [ 284s] monkeypatch.setattr(cu6, "call_process", 
> MockSpawn.call_process) [ 284s] 
> monkeypatch.setattr("libqtile.widget.check_updates.Popen", MockPopen) [ 
> 284s] [ 284s] config = minimal_conf_noscreen [ 284s] config.screens = [ [ 
> 284s] libqtile.config.Screen( [ 284s] top=libqtile.bar.Bar([cu6], 10) [ 
> 284s] ) [ 284s] ] [ 284s] [ 284s] > manager_nospawn.start(config) [ 284s] [ 
> 284s] test/widgets/test_check_updates.py:137: [ 284s] _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 284s] [ 284s] 
> self = <test.conftest.TestManager object at 0x7fb82e05bc40> [ 284s] 
> config_class = <class 
> 'test.widgets.conftest.minimal_conf_noscreen.<locals>.MinimalConf'> [ 284s] 
> no_spawn = False [ 284s] [ 284s] def start(self, config_class, 
> no_spawn=False): [ 284s] rpipe, wpipe = multiprocessing.Pipe() [ 284s] [ 
> 284s] def run_qtile(): [ 284s] try: [ 284s] kore = 
> Core(display_name=self.display) [ 284s] init_log(self.log_level, 
> log_path=None, log_color=False) [ 284s] Qtile( [ 284s] kore, [ 284s] 
> config_class(), [ 284s] socket_path=self.sockfile, [ 284s] 
> no_spawn=no_spawn, [ 284s] ).loop() [ 284s] except Exception: [ 284s] 
> wpipe.send(traceback.format_exc()) [ 284s] [ 284s] self.proc = 
> multiprocessing.Process(target=run_qtile) [ 284s] self.proc.start() [ 284s] 
> [ 284s] # First, wait for socket to appear [ 284s] if 
> can_connect_qtile(self.sockfile, ok=lambda: not rpipe.poll()): [ 284s] 
> ipc_client = ipc.Client(self.sockfile) [ 284s] ipc_command = 
> command.interface.IPCCommandInterface(ipc_client) [ 284s] self.c = 
> command.client.InteractiveCommandClient(ipc_command) [ 284s] return [ 284s] 
> if rpipe.poll(sleep_time): [ 284s] error = rpipe.recv() [ 284s] raise 
> AssertionError("Error launching qtile, traceback:\n%s" % error) [ 284s] > 
> raise AssertionError("Error launching qtile") [ 284s] E AssertionError: 
> Error launching qtile [ 284s] [ 284s] test/conftest.py:301: AssertionError 
> [ 284s] --------------------------- Captured stderr teardown 
> --------------------------- [ 284s] Killing qtile forcefully [ 284s] qtile 
> exited with exitcode: -9 [ 284s] ______________________________ 
> test_notifications ______________________________ [ 284s] [ 284s] 
> manager_nospawn = <test.conftest.TestManager object at 0x7fb82f4d0220> [ 
> 284s] minimal_conf_noscreen = <class 
> 'test.widgets.conftest.minimal_conf_noscreen.<locals>.MinimalConf'> [ 284s] 
> monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fb82f474f70> [ 
> 284s] [ 284s] @pytest.mark.skipif( [ 284s] shutil.which("notify-send") is 
> None, [ 284s] reason="notify-send not installed." [ 284s] ) [ 284s] 
> @pytest.mark.usefixtures("dbus") [ 284s] def 
> test_notifications(manager_nospawn, minimal_conf_noscreen, monkeypatch): [ 
> 284s] notify.Notify.timeout_add = log_timeout [ 284s] widget = 
> notify.Notify(foreground_urgent=URGENT, [ 284s] foreground_low=LOW, [ 284s] 
> default_timeout=DEFAULT_TIMEOUT) [ 284s] config = minimal_conf_noscreen [ 
> 284s] config.screens = [ [ 284s] libqtile.config.Screen( [ 284s] 
> top=Bar([widget], 10) [ 284s] ) [ 284s] ] [ 284s] [ 284s] 
> manager_nospawn.start(config) [ 284s] obj = 
> manager_nospawn.c.widget["notify"] [ 284s] [ 284s] # Send first 
> notification and check time and display time [ 284s] notif_1 = [NS] [ 284s] 
> notif_1.extend(NOTIFICATION_1) [ 284s] subprocess.run(notif_1) [ 284s] > 
> assert obj.info()["text"] == MESSAGE_1 [ 284s] E assert '' == '<span 
> weight="bold">Message 1</span> - Test Message 1' [ 284s] E - <span 
> weight="bold">Message 1</span> - Test Message 1 [ 284s] [ 284s] 
> test/widgets/test_notify.py:112: AssertionError [ 284s] 
> ----------------------------- Captured stdout call 
> ----------------------------- [ 284s] 2021-08-09 21:23:57,866 INFO libqtile 
> core.py:_get_target_chain():L373 Unhandled event: ConfigureNotify [ 284s] 
> =============================== warnings summary 
> =============================== [ 284s] 
> ../../../../../usr/lib/python3.8/site-packages/mpd/base.py:20 [ 284s] 
> /usr/lib/python3.8/site-packages/mpd/base.py:20: DeprecationWarning: Using 
> or importing the ABCs from 'collections' instead of from 'collections.abc' 
> is deprecated since Python 3.3, and in 3.10 it will stop working [ 284s] 
> from collections import Callable [ 284s] [ 284s] -- Docs: 
> https://docs.pytest.org/en/stable/warnings.html [ 284s] 
> =========================== short test summary info 
> ============================ [ 284s] FAILED 
> test/widgets/test_check_updates.py::test_update_available_with_execute [ 
> 284s] FAILED test/widgets/test_notify.py::test_notifications - assert '' == 
> '<span ... [ 284s] ======= 2 failed, 611 passed, 7 skipped, 1 warning in 
> 241.96s (0:04:01) ======== [ 284s] error: Bad exit status from 
> /var/tmp/rpm-tmp.nCxq1T (%check)
>

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/36326f33-4f34-42f0-af78-e4a1086199c8n%40googlegroups.com.

Reply via email to