def test_unicode_error_dialog(self, path_mocker_stopall):
# mock
mock_logger_error = path_mocker_stopall.MagicMock(name="mock_logger_error")
# patch
path_mocker_stopall.patch.object(scarlett_os.subprocess.logging.Logger, 'error', mock_logger_error)
s_path.unicode_error_dialog()
assert mock_logger_error.call_count == 1
_message = _("The system's locale that you are using is not UTF-8 capable. "
"Unicode support is required for Python3 software like Pitivi. "
"Please correct your system settings; if you try to use Pitivi "
"with a broken locale, weird bugs will happen.")
mock_logger_error.assert_any_call(_message)
评论列表
文章目录