<commit_before># -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
#  Package: Pikos toolkit
#  File: monitors/test_focused_line_monitor.py
#  License: LICENSE.TXT
#
#  Copyright (c) 2012, Enthought, Inc.
#  All rights reserved.
#------------------------------------------------------------------------------
import StringIO
import unittest

from pikos.recorders.list_recorder import ListRecorder
from pikos.tests.compat import TestCase


class TestFocusedLineMemoryMonitor(TestCase):

    def setUp(self):
        self.check_for_psutils()
        from pikos.monitors.focused_line_memory_monitor import (
            FocusedLineMemoryMonitor)
        self.monitor_type = FocusedLineMemoryMonitor
        self.filename = __file__.replace('.pyc', '.py')
        self.maxDiff = None
        self.stream = StringIO.StringIO()
        self.recorder = ListRecorder()

    def test_focus_on_function(self):

        def gcd(x, y):
            while x > 0:
                x, y = internal(x, y)
            return y<commit_msg>update copyright notice<commit_after># -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
#  Package: Pikos toolkit
#  File: monitors/test_focused_line_memory_monitor.py
#  License: LICENSE.TXT
#
#  Copyright (c) 2012, Enthought, Inc.
#  All rights reserved.
#------------------------------------------------------------------------------
import StringIO
import unittest

from pikos.recorders.list_recorder import ListRecorder
from pikos.tests.compat import TestCase


class TestFocusedLineMemoryMonitor(TestCase):

    def setUp(self):
        self.check_for_psutils()
        from pikos.monitors.focused_line_memory_monitor import (
            FocusedLineMemoryMonitor)
        self.monitor_type = FocusedLineMemoryMonitor
        self.filename = __file__.replace('.pyc', '.py')
        self.maxDiff = None
        self.stream = StringIO.StringIO()
        self.recorder = ListRecorder()

    def test_focus_on_function(self):

        def gcd(x, y):
            while x > 0:
                x, y = internal(x, y)
            return y
{'fraction_non_alphanumeric': 0.22603056970819824, 'fraction_numerical': 0.00555812876331635, 'mean_word_length': 1.7033792240300376, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1208159', 'n_tokens_mistral': 599, 'n_tokens_neox': 570, 'n_words': 129}