def setUp(self):
        try:
            from pikos.cymonitors.focused_function_monitor import (
                FocusedFunctionMonitor)
        except __HOLE__:
            self.skipTest('Cython FocusedFunctionMonitor is not available')
        self.maxDiff = None
        self.stream = StringIO.StringIO()

        def monitor_factory(functions=[]):
            return FocusedFunctionMonitor(
                functions=functions, recorder=self.recorder)

        self.helper = FocusedMonitoringHelper(monitor_factory)
        self.filename = self.helper.filename
        self.recorder = TextStreamRecorder(
            text_stream=self.stream,
            filter_=OnValue('filename', self.filename))
dataset/ETHPy150Open enthought/pikos/pikos/tests/test_focused_cfunction_monitor.py/TestFocusedCFunctionMonitor.setUp