Closed Artturin closed 1 year ago
to run the docker image i ran these commands
docker build . -t flashfocus
docker run flashfocus
not sure if correct, I haven't used docker much
run-last-failure: no previously failed tests, not deselecting items.
test/test_cli.py::test_custom_configfile FAILED [ 0%]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> captured stderr >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
INFO:root:Loading configuration from /tmp/pytest-of-user/pytest-0/test_custom_configfile0/conf.yml
INFO:root:Initializing with parameters:
{'simple': False, 'flash_opacity': 0.5, 'flash_lone_windows': 'always', 'ntimepoints': 10, 'flash_on_focus': True, 'default_opacity': 1.0, 'time': 500.0, 'flash_fullscreen': True, 'rules': None}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> captured log >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
INFO root:config.py:349 Loading configuration from /tmp/pytest-of-user/pytest-0/test_custom_configfile0/conf.yml
INFO root:cli.py:121 Initializing with parameters:
{'simple': False, 'flash_opacity': 0.5, 'flash_lone_windows': 'always', 'ntimepoints': 10, 'flash_on_focus': True, 'default_opacity': 1.0, 'time': 500.0, 'flash_fullscreen': True, 'rules': None}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f50615fcf10>
blank_cli_options = {'default_opacity': None, 'flash_fullscreen': None, 'flash_lone_windows': None, 'flash_on_focus': None, ...}
configfile = local('/tmp/pytest-of-user/pytest-0/test_custom_configfile0/conf.yml')
def test_custom_configfile(monkeypatch, blank_cli_options, configfile):
cli_options = blank_cli_options
cli_options["config"] = str(configfile)
monkeypatch.setattr(FlashServer, "event_loop", return_opacity)
> opacity = init_server(cli_options)
blank_cli_options = {'default_opacity': None, 'flash_fullscreen': None, 'flash_lone_windows': None, 'flash_on_focus': None, ...}
cli_options = {'default_opacity': None, 'flash_fullscreen': None, 'flash_lone_windows': None, 'flash_on_focus': None, ...}
configfile = local('/tmp/pytest-of-user/pytest-0/test_custom_configfile0/conf.yml')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f50615fcf10>
test/test_cli.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
flashfocus/cli.py:122: in init_server
server = FlashServer(config)
cli_options = {'default_opacity': None, 'flash_fullscreen': None, 'flash_lone_windows': None, 'flash_on_focus': None, ...}
config = {'default_opacity': 1.0, 'flash_fullscreen': True, 'flash_lone_windows': 'always', 'flash_on_focus': True, ...}
config_file_path = '/tmp/pytest-of-user/pytest-0/test_custom_configfile0/conf.yml'
flashfocus/server.py:48: in __init__
self.producers = [ClientMonitor(self.events), DisplayHandler(self.events)]
config = {'default_opacity': 1.0, 'flash_fullscreen': True, 'flash_lone_windows': 'always', 'flash_on_focus': True, ...}
self = <flashfocus.server.FlashServer object at 0x7f50615fea40>
flashfocus/display_protocols/x11.py:212: in __init__
self.message_window: Window = _create_message_window()
__class__ = <class 'flashfocus.display_protocols.x11.DisplayHandler'>
queue = <queue.Queue object at 0x7f50615ff460>
self = <DisplayHandler(Thread-2, initial)>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _create_message_window() -> Window:
"""Create a hidden window for sending X client-messages.
The window's properties can be used to send messages between threads.
Returns
-------
int
An X-window id.
"""
> setup = conn.get_setup()
E AttributeError: 'NoneType' object has no attribute 'get_setup'
Grr arch's gpg keys have caused no end of trouble with this dockerfile. Thanks for the fix @Artturin. Confirmed that the build is working on my end as well. Was that test failure run from this branch? I just ran the tests from this branch and all seemed to pass:
make run_tests
...
============================================ 122 passed in 21.13s ============================================
I'm happy to merge this unless there's anything more you wanted to look into re: the test failures?
i ran it from this branch, perhaps there's something that only works on your system. will investigate more
this can be merged
(ready to merge)
the error that showed was many of these
:: File /var/cache/pacman/pkg/gzip-1.12-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)). Do you want to delete it? [Y/n] error: gzip: signature from "Levente Polyak (anthraxx) levente@leventepolyak.net" is unknown trust
fix found in https://github.com/sickcodes/Docker-OSX/issues/485#issuecomment-1105978096
there's also a bug report at https://bugs.archlinux.org/task/75262