-
Committer:
Colin Watson
-
Date:
2024-03-03 15:49:34 UTC
-
Revision ID:
cjwatson@ubuntu.com-20240303154934-utkjvf3o38ku9rm9
Fix tests on Python 3.11.
Tests were failing as follows:
======================================================================
ERROR: test_hook_unhook_emit (storm.tests.event.EventTest.test_hook_unhook_emit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "storm/tests/mocker.py", line 101, in test_method_wrapper
result = test_method()
^^^^^^^^^^^^^
File "storm/tests/event.py", line 61, in test_hook_unhook_emit
self.assertEqual(sorted(called1), [
^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'Marker' and 'Marker'
This seems to have been prompted by a change to the `list.sort`
implementation in Python 3.11 that I somehow failed to notice before,
but it's easily fixed by giving `Marker` a few trivial comparison
methods.