<commit_before>from igv_api import _IGVRobot, IGVCommandLineRobot
import logging
import sys
import unittest


class IGVRobotStub(_IGVRobot):
    def __init__(self):
        super(IGVRobotStub, self).__init__()

        self.execute_impl_called = False

    def _execute_impl(self, commands):
        self.execute_impl_called = True


class TestBasicUseCases(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        # enable logging to simplify debugging
        logger = logging.getLogger()
        logger.level = logging.DEBUG
        stream_handler = logging.StreamHandler(sys.stdout)
        logger.addHandler(stream_handler)

    def setUp(self):
        if sys.version_info.major < 3:
            self.assertRaisesRegex = self.assertRaisesRegexp

    def test_igv_robot_parent_class(self):
        expected_command_queue = [
            "new",
            "load file1.bam",
            "load file1.bam,file2.bam",
            "collapse",
            "squish",
            "expand",
            "viewaspairs",
            "genome hg18",
            "maxPanelHeight 30",
            "goto Y:1000",
            "region 3 10 1000",
            "goto M:1000",
            "goto chr14:1000,chr3:12345",
            "goto X:1000,Y:12345",
            "region X 10 1000",
            "region chrMT 20 2000",
            "snapshot",
            "snapshot file1.png",
            "snapshot file2.png",
            "preference DEFAULT_FONT_SIZE 20",
            "exit",
        ]
<commit_msg>Fixed unittest<commit_after>from igv_api import _IGVRobot, IGVCommandLineRobot
import logging
import sys
import unittest


class IGVRobotStub(_IGVRobot):
    def __init__(self):
        super(IGVRobotStub, self).__init__()

        self.execute_impl_called = False

    def _execute_impl(self, commands):
        self.execute_impl_called = True


class TestBasicUseCases(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        # enable logging to simplify debugging
        logger = logging.getLogger()
        logger.level = logging.DEBUG
        stream_handler = logging.StreamHandler(sys.stdout)
        logger.addHandler(stream_handler)

    def setUp(self):
        if sys.version_info.major < 3:
            self.assertRaisesRegex = self.assertRaisesRegexp

    def test_igv_robot_parent_class(self):
        expected_command_queue = [
            "new",
            "load file1.bam",
            "load file1.bam,file2.bam",
            "collapse",
            "squish",
            "expand",
            "viewaspairs",
            "genome hg18",
            "maxPanelHeight 30",
            "goto Y:1000",
            "goto 3:10-1000",
            "goto M:1000",
            "goto chr14:1000,chr3:12345",
            "goto X:1000,Y:12345",
            "region X 10 1000",
            "region chrMT 20 2000",
            "snapshot",
            "snapshot file1.png",
            "snapshot file2.png",
            "preference DEFAULT_FONT_SIZE 20",
            "exit",
        ]

{'fraction_non_alphanumeric': 0.09469823274424809, 'fraction_numerical': 0.04001333777925975, 'mean_word_length': 1.9498525073746313, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4785280', 'n_tokens_mistral': 987, 'n_tokens_neox': 878, 'n_words': 185}