Skip to content

Commit 843a3eb

Browse files
committed
test.ble: fix tests for changes in enum repr in Python 3.12
It appears that Python has changed how repr works for enums in some cases. This fixes tests that were failing on Python 3.12.
1 parent 19f1c01 commit 843a3eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/ble/test_lwp3_messages.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,8 @@ def test_constructor(self):
945945
assert (
946946
repr(msg)
947947
== "PortInfoModeInfoMessage(<PortID.1: 1>, <ModeCapabilities.INPUT|OUTPUT: 3>, 5, [0, 1, 2], [3, 4])"
948+
or repr(msg)
949+
== "PortInfoModeInfoMessage(<PortID.1: 1>, <ModeCapabilities.OUTPUT|INPUT: 3>, 5, [0, 1, 2], [3, 4])"
948950
)
949951

950952
def test_parse_message(self):
@@ -1174,6 +1176,8 @@ def test_constructor(self):
11741176
assert (
11751177
repr(msg)
11761178
== "PortModeInfoCapabilitiesMessage(<PortID.1: 1>, 2, <IODeviceCapabilities.1: 1>)"
1179+
or repr(msg)
1180+
== "PortModeInfoCapabilitiesMessage(<PortID.1: 1>, 2, <IODeviceCapabilities: 1>)"
11771181
)
11781182

11791183
def test_parse_message(self):

0 commit comments

Comments
 (0)