Skip to content

Commit

Permalink
Fix test_format_error_message
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Feb 5, 2024
1 parent eebf7ee commit 54c04fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tribler/gui/tests/test_core_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ def test_decode_raw_core_output(core_manager):
assert core_manager.decode_raw_core_output('test привет'.encode('cp1251')) == r'test \xef\xf0\xe8\xe2\xe5\xf2'


@patch('os.name', 'nt')
def test_format_error_message():
actual = CoreManager.format_error_message(exit_code=errno.ENOENT, exit_status=1)
expected = '''The Tribler core has unexpectedly finished with exit code 2 (0x2) and status: 1.
actual = CoreManager.format_error_message(exit_code=-1073741819, exit_status=1)
expected = '''The Tribler core has unexpectedly finished with exit code -1073741819 (0xc0000005) and status: 1.
Error message: No such file or directory'''
Error message: STATUS_ACCESS_VIOLATION'''

assert actual == expected

Expand Down

0 comments on commit 54c04fb

Please sign in to comment.