<commit_before>import unittest

# temp
import sys
sys.path.append('build/lib.linux-x86_64-3.3')

import encoder.json

class JsonTests(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.encode = encoder.json.Encoder().encode

    def test_None(self):
        self.assertEqual(self.encode(None), 'null')

    def test_True(self):
        self.assertEqual(self.encode(True), 'true')

    def test_False(self):
        self.assertEqual(self.encode(False), 'false')

    def test_int(self):
        self.assertEqual(self.encode(2), '2')

    def test_float(self):
        self.assertEqual(self.encode(2.5), '2.5')

    def test_str_empty(self):
        self.assertEqual(self.encode(""), '""')

    def test_str_literal(self):
        self.assertEqual(self.encode("abc"), '"abc"')

    def test_str_escape(self):
        self.assertEqual(self.encode("a\"bc"), '"a\\"bc"')
<commit_msg>test for list (which is still hardcoded to json)<commit_after>import unittest

# temp
import sys
sys.path.append('build/lib.linux-x86_64-3.3')

import encoder.json

class JsonTests(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.encode = encoder.json.Encoder().encode

    def test_None(self):
        self.assertEqual(self.encode(None), 'null')

    def test_True(self):
        self.assertEqual(self.encode(True), 'true')

    def test_False(self):
        self.assertEqual(self.encode(False), 'false')

    def test_int(self):
        self.assertEqual(self.encode(2), '2')

    def test_float(self):
        self.assertEqual(self.encode(2.5), '2.5')

    def test_str_empty(self):
        self.assertEqual(self.encode(""), '""')

    def test_str_literal(self):
        self.assertEqual(self.encode("abc"), '"abc"')

    def test_str_escape(self):
        self.assertEqual(self.encode("a\"bc"), '"a\\"bc"')

    def test_list(self):
        # Keep test agnostic as to spaces after commas
        self.assertEqual(self.encode([1, 2, 3]), '[1, 2, 3]'.replace(' ', ''))

{'fraction_non_alphanumeric': 0.16174261392088132, 'fraction_numerical': 0.015022533800701052, 'mean_word_length': 3.3060344827586206, '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': '839082', 'n_tokens_mistral': 680, 'n_tokens_neox': 648, 'n_words': 116}