# Path: mu/i18n.py
# def set_language(language_code, localedir=localedir):
# 
# Path: mu/interface/panes.py
# CHARTS = True
# 
# Path: mu/interface/themes.py
# DAY_STYLE = load_stylesheet("day.css")
# 
# NIGHT_STYLE = load_stylesheet("night.css")
# 
# CONTRAST_STYLE = load_stylesheet("contrast.css")


from PyQt5.QtWidgets import QMessageBox, QLabel, QMenu
from PyQt5.QtCore import Qt, QEvent, QPointF, QUrl
from PyQt5.QtGui import QTextCursor, QMouseEvent
from collections import deque
from unittest import mock
from mu import i18n
from mu.interface.panes import CHARTS
from mu.interface.themes import DAY_STYLE, NIGHT_STYLE, CONTRAST_STYLE
import sys
import os
import signal
import pytest
import mu
import mu.interface.panes
    of the new child Python process.

    If running on Darwin, ensure that the correct encoding for the Python
    environment is used (Flask stop and complain about a misconfigured
    Python 3 using an ASCII encoding).
    """
    mock_process = mock.MagicMock()
    mock_process_class = mock.MagicMock(return_value=mock_process)
    mock_merge_chans = mock.MagicMock()
    mock_process_class.MergedChannels = mock_merge_chans
    mock_environment = mock.MagicMock()
    mock_environment_class = mock.MagicMock()
    mock_environment_class.systemEnvironment.return_value = mock_environment
    interpreter = sys.executable
    script_filename = "script.py"
    with mock.patch(
        "mu.interface.panes.QProcess", mock_process_class
    ), mock.patch("mu.interface.panes.sys") as mock_sys, mock.patch(
        "mu.interface.panes.QProcessEnvironment", mock_environment_class
    ):
        mock_sys.platform = "darwin"
        ppp = mu.interface.panes.PythonProcessPane()
        envars = {"name": "value"}
        ppp.start_process(
            interpreter,
            script_filename,
            "workspace",
            interactive=False,
            envars=envars,
        )

# Path: mu/i18n.py
# def set_language(language_code, localedir=localedir):
# 
# Path: mu/interface/panes.py
# CHARTS = True
# 
# Path: mu/interface/themes.py
# DAY_STYLE = load_stylesheet("day.css")
# 
# NIGHT_STYLE = load_stylesheet("night.css")
# 
# CONTRAST_STYLE = load_stylesheet("contrast.css")


# Path: tests/interface/test_panes.py
from PyQt5.QtWidgets import QMessageBox, QLabel, QMenu
from PyQt5.QtCore import Qt, QEvent, QPointF, QUrl
from PyQt5.QtGui import QTextCursor, QMouseEvent
from collections import deque
from unittest import mock
from mu import i18n
from mu.interface.panes import CHARTS
from mu.interface.themes import DAY_STYLE, NIGHT_STYLE, CONTRAST_STYLE
import sys
import os
import signal
import pytest
import mu
import mu.interface.panes

    of the new child Python process.

    If running on Darwin, ensure that the correct encoding for the Python
    environment is used (Flask stop and complain about a misconfigured
    Python 3 using an ASCII encoding).
    """
    mock_process = mock.MagicMock()
    mock_process_class = mock.MagicMock(return_value=mock_process)
    mock_merge_chans = mock.MagicMock()
    mock_process_class.MergedChannels = mock_merge_chans
    mock_environment = mock.MagicMock()
    mock_environment_class = mock.MagicMock()
    mock_environment_class.systemEnvironment.return_value = mock_environment
    interpreter = sys.executable
    script_filename = "script.py"
    with mock.patch(
        "mu.interface.panes.QProcess", mock_process_class
    ), mock.patch("mu.interface.panes.sys") as mock_sys, mock.patch(
        "mu.interface.panes.QProcessEnvironment", mock_environment_class
    ):
        mock_sys.platform = "darwin"
        ppp = mu.interface.panes.PythonProcessPane()
        envars = {"name": "value"}
        ppp.start_process(
            interpreter,
            script_filename,
            "workspace",
            interactive=False,
            envars=envars,
        )

    expected_encoding = "{}.utf-8".format(i18n.language_code)