<commit_before>"""Tests exceptions and DB-API exception wrapping."""


from sqlalchemy import exc as sa_exceptions
from sqlalchemy.test import TestBase

# Py3K StandardError = BaseException Py2K

from exceptions import StandardError, KeyboardInterrupt, SystemExit

# end Py2K


class Error(StandardError):
    """This class will be old-style on <= 2.4 and new-style on >=
    2.5."""


class DatabaseError(Error):
    pass


class OperationalError(DatabaseError):
    pass


class ProgrammingError(DatabaseError):
    def __str__(self):
        return '<%s>' % self.bogus


class OutOfSpec(DatabaseError):
    pass


class WrapTest(TestBase):

    def test_db_error_normal(self):
        try:<commit_msg>restore py2k directive that got whacked by python tidy<commit_after>"""Tests exceptions and DB-API exception wrapping."""


from sqlalchemy import exc as sa_exceptions
from sqlalchemy.test import TestBase

# Py3K 
#StandardError = BaseException 
# Py2K
from exceptions import StandardError, KeyboardInterrupt, SystemExit
# end Py2K


class Error(StandardError):
    """This class will be old-style on <= 2.4 and new-style on >=
    2.5."""


class DatabaseError(Error):
    pass


class OperationalError(DatabaseError):
    pass


class ProgrammingError(DatabaseError):
    def __str__(self):
        return '<%s>' % self.bogus


class OutOfSpec(DatabaseError):
    pass


class WrapTest(TestBase):

    def test_db_error_normal(self):
        try:
{'fraction_non_alphanumeric': 0.08953168044077135, 'fraction_numerical': 0.010330578512396695, 'mean_word_length': 4.080419580419581, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4299660', 'n_tokens_mistral': 456, 'n_tokens_neox': 427, 'n_words': 131}