# Path: matl_online/octave.py
# class OctaveSession:
#     """Class for communicating with Octave."""
# 
#     def __init__(self, octaverc=None, paths=None):
#         """Build the Octave interface with the specified config and PATH."""
#         self.octaverc = octaverc
#         self.paths = paths if paths else []
#         self.launch()
# 
#     def launch(self):
#         """Launch Octave and execute setup commands."""
#         self._engine = OctaveEngine()
# 
#         if self.octaverc:
#             self.eval('source("''%s''")' % self.octaverc)
# 
#         for path in self.paths:
#             self.eval('addpath("''%s''")' % path)
# 
#     def eval(self, code, **kwargs):
#         """Evaluate some code in Octave."""
#         handler = kwargs.pop('line_handler', self._engine.line_handler)
#         self._engine.line_handler = handler
#         return self._engine.eval(code, **kwargs)
# 
#     def restart(self):
#         """Terminate and re-launch the Octave instance."""
#         if self._engine:
#             self.terminate()
# 
#         self.launch()
# 
#     def terminate(self):
#         """Terminate the underlying Octave process."""
#         self._engine.repl.terminate()
#         self._engine = None


import os
from unittest import mock
from matl_online.octave import OctaveSession
"""Unit tests for the module for interacting with Octave."""





class TestOctaveSession:
    """Series of tests for the OctaveSession class."""

    def test_no_inputs(self, mocker):
        """Ensure the proper default parameters."""
        # Make sure that eval wasn't called
        mock = mocker.patch('matl_online.octave.OctaveSession.eval')


# Path: matl_online/octave.py
# class OctaveSession:
#     """Class for communicating with Octave."""
# 
#     def __init__(self, octaverc=None, paths=None):
#         """Build the Octave interface with the specified config and PATH."""
#         self.octaverc = octaverc
#         self.paths = paths if paths else []
#         self.launch()
# 
#     def launch(self):
#         """Launch Octave and execute setup commands."""
#         self._engine = OctaveEngine()
# 
#         if self.octaverc:
#             self.eval('source("''%s''")' % self.octaverc)
# 
#         for path in self.paths:
#             self.eval('addpath("''%s''")' % path)
# 
#     def eval(self, code, **kwargs):
#         """Evaluate some code in Octave."""
#         handler = kwargs.pop('line_handler', self._engine.line_handler)
#         self._engine.line_handler = handler
#         return self._engine.eval(code, **kwargs)
# 
#     def restart(self):
#         """Terminate and re-launch the Octave instance."""
#         if self._engine:
#             self.terminate()
# 
#         self.launch()
# 
#     def terminate(self):
#         """Terminate the underlying Octave process."""
#         self._engine.repl.terminate()
#         self._engine = None


# Path: tests/test_octave.py
import os
from unittest import mock
from matl_online.octave import OctaveSession

"""Unit tests for the module for interacting with Octave."""





class TestOctaveSession:
    """Series of tests for the OctaveSession class."""

    def test_no_inputs(self, mocker):
        """Ensure the proper default parameters."""
        # Make sure that eval wasn't called
        mock = mocker.patch('matl_online.octave.OctaveSession.eval')


        session = OctaveSession()