<commit_before>from django.test.simple import DjangoTestSuiteRunner

import unittest
from unittest import TextTestResult

from djangae.db.backends.appengine.dbapi import NotSupportedError, CouldBeSupportedError

class SkipUnsupportedTestResult(TextTestResult):

    def addError(self, test, err):
        if err[0] == NotSupportedError:
            self.addExpectedFailure(test, err)
        elif err[0] == CouldBeSupportedError:
            self.addSkip(test, "This test could be supported by Djangae, but currently isn't")
        else:
            super(SkipUnsupportedTestResult, self).addError(test, err)

class DjangaeTestSuiteRunner(DjangoTestSuiteRunner):
    def run_suite(self, suite, **kwargs):
        return unittest.TextTestRunner(
            verbosity=self.verbosity,<commit_msg>Actually, use expectedFailure for CouldBeSupportedError too<commit_after>from django.test.simple import DjangoTestSuiteRunner

import unittest
from unittest import TextTestResult

from djangae.db.backends.appengine.dbapi import NotSupportedError, CouldBeSupportedError

class SkipUnsupportedTestResult(TextTestResult):

    def addError(self, test, err):
        if err[0] in (NotSupportedError, CouldBeSupportedError):
            self.addExpectedFailure(test, err)
        else:
            super(SkipUnsupportedTestResult, self).addError(test, err)

class DjangaeTestSuiteRunner(DjangoTestSuiteRunner):
    def run_suite(self, suite, **kwargs):
        return unittest.TextTestRunner(
            verbosity=self.verbosity,
{'fraction_non_alphanumeric': 0.0756578947368421, 'fraction_numerical': 0.001973684210526316, 'mean_word_length': 4.299651567944251, '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': '7183261', 'n_tokens_mistral': 426, 'n_tokens_neox': 420, 'n_words': 98}