--- Begin Message ---
Source: i3pystatus
Version: 3.35+git20191126.5a8eaf4-2
Severity: serious
Tags: sid bookworm
User: debian...@lists.debian.org
Usertags: needs-update
User: debian-pyt...@lists.debian.org
Usertags: python3.11
Control: affects -1 src:python3-defaults
Dear maintainer(s),
We are in the transition of adding python3.11 as a supported Python
version [0]. With a recent upload of python3-defaults the autopkgtest of
i3pystatus fails in testing when that autopkgtest is run with the binary
packages of python3-defaults from unstable. It passes when run with only
packages from testing. In tabular form:
pass fail
python3-defaults from testing 3.10.6-3
i3pystatus from testing 3.35+git20191126.5a8eaf4-2
all others from testing from testing
I copied some of the output at the bottom of this report.
Currently this regression is blocking the migration of python3-defaults
to testing [1]. https://docs.python.org/3/whatsnew/3.11.html lists
what's new in Python3.11, it may help to identify what needs to be updated.
More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation
Paul
[0] https://bugs.debian.org/1021984
[1] https://qa.debian.org/excuses.php?package=python3-defaults
https://ci.debian.net/data/autopkgtest/testing/amd64/i/i3pystatus/28726233/log.gz
=================================== FAILURES
===================================
____________ CallbacksMetaTest.test_callback_set_post_instanciation
____________
self = <test_callbacks.CallbacksMetaTest
testMethod=test_callback_set_post_instanciation>
def test_callback_set_post_instanciation(self):
counter = self.NoDefaultCounter()
# set callbacks
counter.on_leftclick = "update_counter"
counter.on_rightclick = ["update_counter", 2]
counter.on_upscroll = [print, "i3 is", "awesome"]
counter.on_downscroll = ["update_counter", -1]
self.assertEqual(counter.counter, 0)
counter.on_click(1) # left_click
self.assertEqual(counter.counter, 1)
E AssertionError: 0 != 1
tests/test_callbacks.py:60: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_callbacks.NoDefaultCounter:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_callbacks.NoDefaultCounter:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 162, in __button_callback_handler
call_callback(getattr(self, cb), *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
________________________ test_clicks[events1-leftclick]
________________________
events = ((0.4, 1),), expected = 'leftclick'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'leftclick'
E - leftclick
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
________________________ test_clicks[events2-leftclick]
________________________
events = ((0.4, 1), (0.4, 1)), expected = 'leftclick'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'leftclick'
E - leftclick
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
_____________________ test_clicks[events3-doubleleftclick]
_____________________
events = ((0.2, 1), (0, 1)), expected = 'doubleleftclick'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'doubleleftclick'
E - doubleleftclick
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
________________________ test_clicks[events4-leftclick]
________________________
events = ((0.2, 1), (0, 1), (0.3, 1)), expected = 'leftclick'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'leftclick'
E - leftclick
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
________________________ test_clicks[events5-leftclick]
________________________
events = ((0.2, 1), (0, 3)), expected = 'leftclick'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'leftclick'
E - leftclick
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
____________________ test_clicks[events7-doublerightclick]
_____________________
events = ((0.2, 3), (0, 3)), expected = 'doublerightclick'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'doublerightclick'
E - doublerightclick
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
_______________________ test_clicks[events8-downscroll]
________________________
events = ((0, 5), (0, 5)), expected = 'downscroll'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'downscroll'
E - downscroll
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
________________________ test_clicks[events9-upscroll]
_________________________
events = ((0.4, 4),), expected = 'upscroll'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'upscroll'
E - upscroll
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
_____________________ test_clicks[events10-doubleupscroll]
_____________________
events = ((0, 4), (0, 4)), expected = 'doubleupscroll'
@pytest.mark.parametrize("events, expected", [
# Fast click
(((0, left_click),),
'no action'),
# Slow click
(((0.4, left_click),),
'leftclick'),
# Slow double click
(((0.4, left_click),
(0.4, left_click),),
'leftclick'),
# Fast double click
(((0.2, left_click),
(0, left_click),),
'doubleleftclick'),
# Fast double click + Slow click
(((0.2, left_click),
(0, left_click),
(0.3, left_click),),
'leftclick'),
# Alternate double click
(((0.2, left_click),
(0, right_click),),
'leftclick'),
# Slow click, no callback
(((0.4, right_click),),
'no action'),
# Fast double click
(((0.2, right_click),
(0, right_click),),
'doublerightclick'),
# Fast double click
(((0, scroll_down),
(0, scroll_down),),
'downscroll'),
# Slow click
(((0.4, scroll_up),),
'upscroll'),
# Fast double click
(((0, scroll_up),
(0, scroll_up),),
'doubleupscroll'),
])
def test_clicks(events, expected):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_doubleleftclick = [set_action, "doubleleftclick"]
# on_rightclick = [set_action, "rightclick"]
on_doublerightclick = [set_action, "doublerightclick"]
on_upscroll = [set_action, "upscroll"]
on_doubleupscroll = [set_action, "doubleupscroll"]
on_downscroll = [set_action, "downscroll"]
# on_doubledownscroll = [set_action, "doubledownscroll"]
_action = 'no action'
# Divide all times by 10 to make the test run faster
TestClicks.multi_click_timeout /= 10
m = TestClicks()
for sl, ev in events:
m.on_click(ev)
time.sleep(sl / 10)
assert m._action == expected
E AssertionError: assert 'no action' == 'doubleupscroll'
E - doubleupscroll
E + no action
tests/test_core_modules.py:94: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
__________________ test_callback_handler_method[1-leftclick]
___________________
button = 1, stored_value = 'leftclick'
@pytest.mark.parametrize("button, stored_value", [
(left_click, "leftclick"),
(right_click, "rightclick")
])
def test_callback_handler_method(button, stored_value):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_rightclick = ["set_action", "rightclick"]
dut = TestClicks()
dut.on_click(button)
assert dut._action == stored_value
E AttributeError: 'TestClicks' object has no attribute '_action'
tests/test_core_modules.py:112: AttributeError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 154, in __button_callback_handler
call_callback(cb, self, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
__________________ test_callback_handler_method[3-rightclick]
__________________
button = 3, stored_value = 'rightclick'
@pytest.mark.parametrize("button, stored_value", [
(left_click, "leftclick"),
(right_click, "rightclick")
])
def test_callback_handler_method(button, stored_value):
class TestClicks(IntervalModule):
def set_action(self, action):
self._action = action
on_leftclick = [set_action, "leftclick"]
on_rightclick = ["set_action", "rightclick"]
dut = TestClicks()
dut.on_click(button)
assert dut._action == stored_value
E AttributeError: 'TestClicks' object has no attribute '_action'
tests/test_core_modules.py:112: AttributeError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 162, in __button_callback_handler
call_callback(getattr(self, cb), *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
________________________ test_callback_handler_function
________________________
def test_callback_handler_function():
callback_mock = MagicMock()
class TestClicks(IntervalModule):
on_upscroll = [callback_mock.callback, "upscroll"]
dut = TestClicks()
dut.on_click(scroll_up)
callback_mock.callback.assert_called_once_with("upscroll")
tests/test_core_modules.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock name='mock.callback' id='140075500344848'>
args = ('upscroll',), kwargs = {}
msg = "Expected 'callback' to be called once. Called 0 times.\nCalls:
[call.__str__()]."
def assert_called_once_with(self, /, *args, **kwargs):
"""assert that the mock was called exactly once and that that
call was
with the specified arguments."""
if not self.call_count == 1:
msg = ("Expected '%s' to be called once. Called %s times.%s"
% (self._mock_name or 'mock',
self.call_count,
self._calls_repr()))
raise AssertionError(msg)
E AssertionError: Expected 'callback' to be called once.
Called 0 times.
E Calls: [call.__str__()].
/usr/lib/python3.11/unittest/mock.py:944: AssertionError
------------------------------ Captured log call
-------------------------------
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:174
Exception while processing button callback: AttributeError("module
'inspect' has no attribute 'ArgSpec'")
CRITICAL i3pystatus.test_core_modules.TestClicks:modules.py:176
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 124, in call_callback
args_spec = inspect.getargspec(tmp_cb)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 150, in __button_callback_handler
call_callback(cb, *args, **kwargs)
File
"/tmp/autopkgtest-lxc.x02ylk16/downtmp/build.9fM/src/i3pystatus/core/modules.py",
line 126, in call_callback
args_spec = inspect.ArgSpec([], None, None, None)
^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'ArgSpec'
OpenPGP_signature
Description: OpenPGP digital signature
--- End Message ---