Skip to content

Commit

Permalink
Fix masked broken test cases
Browse files Browse the repository at this point in the history
As far as I can tell, these tests have been incorrect but failure was
masked until Python 3.12.
  • Loading branch information
frogamic authored and hkpeprah committed Jul 12, 2024
1 parent 7f0882f commit 92089e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/test_jlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -6215,10 +6215,11 @@ def test_cp15_register_write_success(self):
``None``
"""
args = [1, 2, 3, 4, 5]
expected = [1, 3, 2, 4, 5]

self.dll.JLINKARM_CP15_WriteEx.return_value = 0
actual = self.jlink.cp15_register_write(*args)
assert self.dll.JLINKARM_CP15_WriteEx.assert_called_once_with(*args)
self.dll.JLINKARM_CP15_WriteEx.assert_called_once_with(*expected)

def test_cp15_register_write_raises_exception_if_CP15_WriteEx_fails(self):
"""Tests that cp15_register_write raises a JLinkException on failure.
Expand All @@ -6242,9 +6243,10 @@ def test_set_log_file_success(self):
``None``
"""
args = ['my/file/path']
expected = [b'my/file/path']
self.dll.JLINKARM_SetLogFile.return_value = 0
self.jlink.set_log_file(*args)
assert self.dll.JLINKARM_SetLogFile.assert_called_once_with(*args)
self.dll.JLINKARM_SetLogFile.assert_called_once_with(*expected)

def test_set_log_file_raises_exception_if_SetLogFile_fails(self):
"""Tests that set_log_file raises a JLinkException on failure.
Expand Down

0 comments on commit 92089e9

Please sign in to comment.