<commit_before>import unittest


class TestDeterministicCache(unittest.TestCase):

    def test_init(self):
        pass

    def test_setitem(self):<commit_msg>Add content for basic tests<commit_after>import unittest
from axelrod import DeterministicCache, TitForTat, Defector


class TestDeterministicCache(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.test_key1 = (TitForTat, Defector)
        cls.test_value1 = [('C', 'D'), ('D', 'D'), ('D', 'D')]

    def test_basic_init(self):
        cache = DeterministicCache()
        self.assertTrue(cache.mutable)
        self.assertEqual(cache.turns, None)

    def test_init_from_file(self):
        pass

    def test_setitem(self):
        cache = DeterministicCache()
        cache[self.test_key1] = self.test_value1
        self.assertEqual(cache[self.test_key1], self.test_value1)

    def test_set_immutable_cache(self):
        cache = DeterministicCache()
        cache.mutable = False
        with self.assertRaises(ValueError):
            cache[self.test_key1] = self.test_value1

    def test_is_valid_key(self):
        cache = DeterministicCache()
        self.assertTrue(cache._is_valid_key(self.test_key1))
        # Should return false if key is not a tuple
        self.assertFalse(cache._is_valid_key('test'))
        # Should return false if tuple is not a pair
        self.assertFalse(cache._is_valid_key(('test', 'test', 'test')))
        # Should return false if contents of tuple are not axelrod Players
        self.assertFalse(cache._is_valid_key(('test', 'test')))

    def test_is_valid_value(self):
{'fraction_non_alphanumeric': 0.10467289719626169, 'fraction_numerical': 0.005607476635514018, 'mean_word_length': 3.271276595744681, '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': '3824582', 'n_tokens_mistral': 513, 'n_tokens_neox': 501, 'n_words': 105}