<commit_before>from __future__ import absolute_import

import Queue
import socket
import threading
import time

from itertools import count

import kombu.five
from kombu.transport.qpid import QpidMessagingExceptionHandler, QoS, Message
from kombu.transport.qpid import Channel, FDShimThread, FDShim
from kombu.transport.qpid import Connection, Transport
from kombu.transport.virtual import Base64
from kombu.utils.compat import OrderedDict
from kombu.tests.case import Case, Mock, SkipTest, mask_modules, patch

import qpid.messaging.exceptions


class test_QpidMessagingExceptionHandler(Case):

    allowed_string = 'object in use'
    not_allowed_string = 'a different string'

    def setUp(self):
        self.handler = QpidMessagingExceptionHandler(self.allowed_string)

    def test_string_stored(self):
        """Assert that the allowed_exception_string is stored correctly"""
        handler_string = self.handler.allowed_exception_string
        self.assertEqual(self.allowed_string, handler_string)

    def test_exception_positive(self):<commit_msg>Moving an import.<commit_after>from __future__ import absolute_import

import Queue
import socket
import threading
import time

from itertools import count

import qpid.messaging.exceptions

import kombu.five
from kombu.transport.qpid import QpidMessagingExceptionHandler, QoS, Message
from kombu.transport.qpid import Channel, FDShimThread, FDShim
from kombu.transport.qpid import Connection, Transport
from kombu.transport.virtual import Base64
from kombu.utils.compat import OrderedDict
from kombu.tests.case import Case, Mock, SkipTest, mask_modules, patch


class test_QpidMessagingExceptionHandler(Case):

    allowed_string = 'object in use'
    not_allowed_string = 'a different string'

    def setUp(self):
        self.handler = QpidMessagingExceptionHandler(self.allowed_string)

    def test_string_stored(self):
        """Assert that the allowed_exception_string is stored correctly"""
        handler_string = self.handler.allowed_exception_string
        self.assertEqual(self.allowed_string, handler_string)

    def test_exception_positive(self):
{'fraction_non_alphanumeric': 0.06067732831608655, 'fraction_numerical': 0.0018814675446848542, 'mean_word_length': 5.2558823529411764, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7039204', 'n_tokens_mistral': 622, 'n_tokens_neox': 594, 'n_words': 165}