# 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
    Ensure the plotter pane is created in the expected manner.
    """
    pp = mu.interface.panes.PlotterPane()
    assert pp.input_buffer == []
    assert pp.raw_data == []
    assert pp.max_x == 100
    assert pp.max_y == 1000
    assert len(pp.data) == 1
    assert isinstance(pp.data[0], deque)
    assert len(pp.series) == 1
    assert isinstance(pp.series[0], mu.interface.panes.QLineSeries)
    assert isinstance(pp.chart, mu.interface.panes.QChart)
    assert isinstance(pp.axis_x, mu.interface.panes.QValueAxis)
    assert isinstance(pp.axis_y, mu.interface.panes.QValueAxis)


@pytest.mark.skipif(not CHARTS, reason="QtChart unavailable")
def test_PlotterPane_process_tty_data():
    """
    If a byte representation of a Python tuple containing numeric values,
    starting at the beginning of a new line and terminating with a new line is
    received, then the add_data method is called with the resulting Python
    tuple.
    """
    pp = mu.interface.panes.PlotterPane()
    pp.add_data = mock.MagicMock()
    pp.process_tty_data(b"(1, 2.3, 4)\r\n")
    pp.add_data.assert_called_once_with((1, 2.3, 4))



# 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

    Ensure the plotter pane is created in the expected manner.
    """
    pp = mu.interface.panes.PlotterPane()
    assert pp.input_buffer == []
    assert pp.raw_data == []
    assert pp.max_x == 100
    assert pp.max_y == 1000
    assert len(pp.data) == 1
    assert isinstance(pp.data[0], deque)
    assert len(pp.series) == 1
    assert isinstance(pp.series[0], mu.interface.panes.QLineSeries)
    assert isinstance(pp.chart, mu.interface.panes.QChart)
    assert isinstance(pp.axis_x, mu.interface.panes.QValueAxis)
    assert isinstance(pp.axis_y, mu.interface.panes.QValueAxis)


@pytest.mark.skipif(not CHARTS, reason="QtChart unavailable")
def test_PlotterPane_process_tty_data():
    """
    If a byte representation of a Python tuple containing numeric values,
    starting at the beginning of a new line and terminating with a new line is
    received, then the add_data method is called with the resulting Python
    tuple.
    """
    pp = mu.interface.panes.PlotterPane()
    pp.add_data = mock.MagicMock()
    pp.process_tty_data(b"(1, 2.3, 4)\r\n")
    pp.add_data.assert_called_once_with((1, 2.3, 4))



@pytest.mark.skipif(not CHARTS, reason="QtChart unavailable")