<commit_before>import time

from tddspry import TestCase


TEST_STRING = 'Something'
TEST_UNICODE = u'Something'


class DummyUnicodeAndStr(object):

    def __str__(self):
        return TEST_STRING * 2

    def __unicode__(self):
        return TEST_UNICODE


class DummyUnicode(object):

    def __unicode__(self):
        return TEST_UNICODE


def dummy_setup():
    pass


def dummy_teardown():
    pass


def raise_exception():
    raise TypeError


class TestNose(TestCase):

    def test_methods(self):
        self.ok_(True)
        self.eq_(True, True)

        self.assert_almost_equal(1.99999999, 1.9999999, 4)
        self.assert_almost_equals(1.99999999, 1.9999999, 4)
        self.assert_not_almost_equal(1.43578901, 1.43758900)
        self.assert_not_almost_equals(1.43578901, 1.43758900)

        self.assert_equal(1, 1)
        self.assert_equals(1, 1)
        self.assert_not_equal(1, 2)
        self.assert_not_equals(1, 2)

        self.assert_false(False)
        self.assert_raises(TypeError, raise_exception)
        self.assert_true(True)

        self.assert_unicode(TEST_STRING, TEST_UNICODE)
        self.assert_unicode(DummyUnicode(), TEST_STRING)<commit_msg>#32: Add tests to feature ``tddspry.TestCase.assert_not_unicode`` method.<commit_after>import time

from tddspry import TestCase


TEST_STRING = 'Something'
TEST_UNICODE = u'Something'


class DummyUnicodeAndStr(object):

    def __str__(self):
        return TEST_STRING * 2

    def __unicode__(self):
        return TEST_UNICODE


class DummyUnicode(object):

    def __unicode__(self):
        return TEST_UNICODE


def dummy_setup():
    pass


def dummy_teardown():
    pass


def raise_exception():
    raise TypeError


class TestNose(TestCase):

    def test_methods(self):
        self.ok_(True)
        self.eq_(True, True)

        self.assert_almost_equal(1.99999999, 1.9999999, 4)
        self.assert_almost_equals(1.99999999, 1.9999999, 4)
        self.assert_not_almost_equal(1.43578901, 1.43758900)
        self.assert_not_almost_equals(1.43578901, 1.43758900)

        self.assert_equal(1, 1)
        self.assert_equals(1, 1)
        self.assert_not_equal(1, 2)
        self.assert_not_equals(1, 2)

        self.assert_false(False)
        self.assert_raises(TypeError, raise_exception)
        self.assert_true(True)

        self.assert_not_unicode(TEST_STRING, TEST_UNICODE[::-1])
        self.assert_not_unicode(DummyUnicode(), TEST_STRING[::-1])
        self.assert_not_unicode(DummyUnicode(), TEST_UNICODE[::-1])
        self.assert_not_unicode(DummyUnicodeAndStr(), TEST_STRING[::-1])
        self.assert_not_unicode(DummyUnicodeAndStr(), TEST_UNICODE[::-1])

        self.assert_unicode(TEST_STRING, TEST_UNICODE)
        self.assert_unicode(DummyUnicode(), TEST_STRING)
{'fraction_non_alphanumeric': 0.10050251256281408, 'fraction_numerical': 0.060660445082555636, 'mean_word_length': 3.28110599078341, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, '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': '5277071', 'n_tokens_mistral': 1097, 'n_tokens_neox': 938, 'n_words': 155}