<commit_before>import unittest
from Encode import Encoder
import Frames
import socket




class TestUM(unittest.TestCase):

    def setUp(self):
        self.encoder = Encoder()
        self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    def test_encoder_get_frame_class(self):
        command = 'SEND'
        self.assertEquals(self.encoder.get_frame_class(command),Frames.SEND)

if __name__ == '__main__':
    unittest.main()<commit_msg>example unit test code updated with exception handling<commit_after>import unittest
from Encode import Encoder
import Frames
import socket




class TestUM(unittest.TestCase):

    def setUp(self):
        self.encoder = Encoder()
        self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    def test_encoder_get_frame_class(self):
        command = 'SEND'
        self.assertEquals(self.encoder.get_frame_class(command),Frames.SEND)

    def test_encoder_invalid_frame_class(self):
        command = '---'
        self.assertRaises(Exception, self.encoder.get_frame_class, command)

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.09498207885304659, 'fraction_numerical': 0.0, 'mean_word_length': 3.8777292576419216, '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': '301338', 'n_tokens_mistral': 353, 'n_tokens_neox': 337, 'n_words': 68}