def __init__(self, executable=None, logger=None, timeout=None, oned_as='row', temp_dir=None): """Start Octave and set up the session. """ self._oned_as = oned_as self._temp_dir = temp_dir or gettempdir() self._executable = executable atexit.register(lambda: _remove_temp_files(self._temp_dir)) self.timeout = timeout if not logger is None: self.logger = logger else: self.logger = get_log() self._session = None self.restart()
def test_remove_files(): from oct2py.utils import _remove_temp_files _remove_temp_files()
def test_remove_files(self): from oct2py.utils import _remove_temp_files _remove_temp_files(self.oc._temp_dir)