def test_focus_on_function_using_tuples(self):

        # local import to avoid errors when the optional depedency psutils is
        # not available
        from pikos.monitors.focused_function_memory_monitor import (
            FocusedFunctionMemoryMonitor)

        recorder = ListRecorder(
            filter_=lambda record: record in self.filename)

        def monitor_factory(functions=[]):
            return FocusedFunctionMemoryMonitor(
                functions=functions,
                recorder=recorder,
                record_type=tuple)

        helper = FocusedMonitoringHelper(monitor_factory)
        result = helper.run_on_function()
        self.assertEqual(result, 3)
        template = [
            "0 call gcd 33 {0}",
            "1 call internal 40 {0}",
            "2 call boo 44 {0}",
            "3 return boo 45 {0}",
            "4 return internal 42 {0}",
            "5 call internal 40 {0}",
            "6 call boo 44 {0}",
            "7 return boo 45 {0}",
            "8 return internal 42 {0}",
            "9 return gcd 36 {0}"]
        self.check_records(template, recorder)
        self.assertEqual(helper.monitor._code_trackers, {})
dataset/ETHPy150Open enthought/pikos/pikos/tests/test_focused_function_memory_monitor.py/TestFocusedFunctionMemoryMonitor.test_focus_on_function_using_tuples/swapped operands of `in`