<commit_before>from twisted.trial import unittest

from better_od import OrderedSet


class TestOrderedDict(unittest.TestCase):
    def setUp(self):
        self.values = 'abcddefg'
        self.s = OrderedSet(self.values)

    def test_order(self):
        expected = list(enumerate('abcdefg'))
        self.assertEquals(list(enumerate(self.s)), expected)

    def test_index(self):
        self.assertEquals(self.s.key_index('c'), 2)

    def test_add_new_value(self):
        prev = len(self.s)
        self.s.add('z')
        self.assertEqual(len(self.s), prev + 1)<commit_msg>Rename tests.test_OrderedSet test cases. Add TestOrderedSetMutations test suite.<commit_after>from twisted.trial import unittest

from better_od import OrderedSet


class TestOrderedSet(unittest.TestCase):
    def setUp(self):
        self.values = 'abcddefg'
        self.s = OrderedSet(self.values)

    def test_order(self):
        expected = list(enumerate('abcdefg'))
        self.assertEquals(list(enumerate(self.s)), expected)

    def test_index(self):
        self.assertEquals(self.s.key_index('c'), 2)


class TestOrderedSetMutations(unittest.TestCase):
    def test_add_new_value(self):
        prev = len(self.s)
        self.s.add('z')
        self.assertEqual(len(self.s), prev + 1)
{'fraction_non_alphanumeric': 0.11962470680218922, 'fraction_numerical': 0.003127443315089914, 'mean_word_length': 3.368600682593857, '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': '4978003', 'n_tokens_mistral': 420, 'n_tokens_neox': 408, 'n_words': 76}