Skip to content

Commit 3382d53

Browse files
committed
Limit test for correct calls to python versions >= 3.8
1 parent 1dd4581 commit 3382d53

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_player.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ def test_play_virtual(self):
6262
data=[0x5, 0xC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0],
6363
)
6464
self.assertEqual(self.MockSleep.call_count, 2)
65-
self.assertTrue(msg1.equals(self.mock_virtual_bus.send.mock_calls[0].args[0]))
66-
self.assertTrue(msg2.equals(self.mock_virtual_bus.send.mock_calls[1].args[0]))
65+
if sys.version_info.major > 3 or sys.version_info.minor >= 8:
66+
# The args argument was introduced with python 3.8
67+
self.assertTrue(msg1.equals(self.mock_virtual_bus.send.mock_calls[0].args[0]))
68+
self.assertTrue(msg2.equals(self.mock_virtual_bus.send.mock_calls[1].args[0]))
6769
self.assertSuccessfulCleanup()
6870

6971
def test_play_virtual_verbose(self):

0 commit comments

Comments
 (0)