<commit_before># -*- coding: utf-8 -*-
#
# This file is part of BridgeDB, a Tor bridge distribution system.
#
# :authors: <NAME> 0xA3ADB67A2CDB8B35 <<EMAIL>>
#           please also see AUTHORS file
# :copyright: (c) 2013, Isis Lovecruft
#             (c) 2007-2013, The Tor Project, Inc.
#             (c) 2007-2013, all entities within the AUTHORS file
# :license: 3-Clause BSD, see LICENSE for licensing information

"""Class wrappers to adapt BridgeDB old unittests in :mod:`bridgedb.Tests` to
be compatible with the newer :mod:`twisted.trial` unittests in this directory.
"""

from __future__ import print_function
from __future__ import unicode_literals

import logging
import warnings

from twisted.trial import unittest

from bridgedb import Tests
from bridgedb.Tests import EmailBridgeDistTests
from bridgedb.Tests import IPBridgeDistTests
from bridgedb.Tests import DictStorageTests
from bridgedb.Tests import SQLStorageTests
from bridgedb.Tests import ParseDescFileTests
from bridgedb.Tests import BridgeStabilityTests

logging.warnings.filterwarnings('ignore', module="Tests")
pyunit = __import__('unittest')


class TrialAdaptedOldUnittests(unittest.TestCase):
    """A wrapper around :mod:`bridgedb.Tests` to produce :mod:`~twisted.trial`
    compatible output.
    """

    def test_allOldUnittests(self):
        testSuite = Tests.testSuite()
        testResult = pyunit.TestResult()
        testSuite.run(testResult, debug=True)
        return unittest.PyUnitResultAdapter(testResult)<commit_msg>Remove imports for bridgedb.Tests classes; import whole module.<commit_after># -*- coding: utf-8 -*-
#
# This file is part of BridgeDB, a Tor bridge distribution system.
#
# :authors: <NAME> 0xA3ADB67A2CDB8B35 <<EMAIL>>
#           please also see AUTHORS file
# :copyright: (c) 2013, <NAME>
#             (c) 2007-2013, The Tor Project, Inc.
#             (c) 2007-2013, all entities within the AUTHORS file
# :license: 3-Clause BSD, see LICENSE for licensing information

"""Class wrappers to adapt BridgeDB old unittests in :mod:`bridgedb.Tests` to
be compatible with the newer :mod:`twisted.trial` unittests in this directory.
"""

from __future__ import print_function
from __future__ import unicode_literals

import logging
import warnings

from twisted.trial import unittest

from bridgedb import Tests

logging.warnings.filterwarnings('ignore', module="Tests")
pyunit = __import__('unittest')


class TrialAdaptedOldUnittests(unittest.TestCase):
    """A wrapper around :mod:`bridgedb.Tests` to produce :mod:`~twisted.trial`
    compatible output.
    """

    def test_allOldUnittests(self):
        testSuite = Tests.testSuite()
        testResult = pyunit.TestResult()
        testSuite.run(testResult, debug=True)
        return unittest.PyUnitResultAdapter(testResult)
{'fraction_non_alphanumeric': 0.09269863994273443, 'fraction_numerical': 0.021474588403722263, 'mean_word_length': 4.2835538752362945, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '6936425', 'n_tokens_mistral': 888, 'n_tokens_neox': 814, 'n_words': 259}