<commit_before>import unittest
import neronet.neromum
import socket
import os
import pickle


class Neromum_test(unittest.TestCase):

    def setUp(self):
        self.mum = neronet.neromum.Neromum()
        self.mum.experiment = 'sleep.py'
        self.d = { "log_output": {1:"stdout", 2:"testi"}, "running": False }
        self.data = pickle.dumps(self.d)
        self.mum.initialize_socket()

    def test_socket_init(self):

        self.assertTrue(self.mum.sock)
        self.assertTrue(isinstance( self.mum.port, int ))
        self.assertEqual(self.mum.host,'127.0.0.1')
        self.assertEqual(self.mum.open_incoming_connections, [self.mum.sock])
        self.assertEqual(self.mum.open_outgoing_connections, [])



    def test_parse_data(self):

        self.mum.data = self.data
        self.mum.parse_nerokid_data()
        self.assertEqual(self.mum.data, self.d)

if __name__ == '__main__':
	unittest.main()<commit_msg>added more to mom unittest<commit_after>import unittest
import neronet.neromum
import socket
import os
import pickle


class Neromum_test(unittest.TestCase):

    def setUp(self):
        self.mum = neronet.neromum.Neromum()
        self.mum.experiment = 'sleep.py'
        self.d = { "log_output": {1:"stdout", 2:"test\n\n\ni\n"}, "running": False }
        self.data = pickle.dumps(self.d)
        self.mum.initialize_socket()

    def test_socket_init(self):

        self.assertTrue(self.mum.sock)
        self.assertTrue(isinstance( self.mum.port, int ))
        self.assertEqual(self.mum.host,'127.0.0.1')
        self.assertEqual(self.mum.open_incoming_connections, [self.mum.sock])
        self.assertEqual(self.mum.open_outgoing_connections, [])



    def test_parse_data(self):

        self.mum.data = self.data
        self.mum.parse_nerokid_data()
        self.assertEqual(self.mum.data, self.d)

if __name__ == '__main__':
	unittest.main()
{'fraction_non_alphanumeric': 0.13354531001589826, 'fraction_numerical': 0.008479067302596715, 'mean_word_length': 3.0602150537634407, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6503896', 'n_tokens_mistral': 689, 'n_tokens_neox': 666, 'n_words': 99}