<commit_before>import unittest
import os
import shutil
import stat

from LF2CRLF import LF2CRLF

class LF2CRLF_Tests(unittest.TestCase):

    def test_ansi_windows_line_ending(self):
        lf2crlf = LF2CRLF(os.join('Test Files', 'ANSI Windows.txt')
        self.assertEqual(lf2crlf.win_line_end, b'\r\n')
        self.assertEqual(lf2crlf.unix_line_end, b'\n')
        self.assertFalse(lf2crlf.unix_endings)
        content = lf2crlf.content
        lf2crlf.convert()
        self.assertEqual(content, lf2crlf.content)
        
    def test_unix_read_only(self):
        lf2crlf = LF2CRLF('Test Files\\Unix Read Only.txt')
        self.assertEqual(lf2crlf.win_line_end, b'\r\0\n\0')
        self.assertEqual(lf2crlf.unix_line_end, b'\n\0')
        self.assertTrue(lf2crlf.unix_endings)
        content = lf2crlf.content
        lf2crlf.convert()
        self.assertNotEqual(content, lf2crlf.content)
        
    def test_utf8_single_line(self):
        lf2crlf = LF2CRLF('Test Files\\UTF-8 Single Line.txt')
        self.assertEqual(lf2crlf.win_line_end, b'\r\n')
        self.assertEqual(lf2crlf.unix_line_end, b'\n')<commit_msg>Update test_LF2CRLF.py<commit_after>import unittest
import os
import shutil
import stat

from LF2CRLF import LF2CRLF

class LF2CRLF_Tests(unittest.TestCase):

    def test_ansi_windows_line_ending(self):
        lf2crlf = LF2CRLF(os.join('Test Files', 'ANSI Windows.txt'))
        self.assertEqual(lf2crlf.win_line_end, b'\r\n')
        self.assertEqual(lf2crlf.unix_line_end, b'\n')
        self.assertFalse(lf2crlf.unix_endings)
        content = lf2crlf.content
        lf2crlf.convert()
        self.assertEqual(content, lf2crlf.content)
        
    def test_unix_read_only(self):
        lf2crlf = LF2CRLF('Test Files\\Unix Read Only.txt')
        self.assertEqual(lf2crlf.win_line_end, b'\r\0\n\0')
        self.assertEqual(lf2crlf.unix_line_end, b'\n\0')
        self.assertTrue(lf2crlf.unix_endings)
        content = lf2crlf.content
        lf2crlf.convert()
        self.assertNotEqual(content, lf2crlf.content)
        
    def test_utf8_single_line(self):
        lf2crlf = LF2CRLF('Test Files\\UTF-8 Single Line.txt')
        self.assertEqual(lf2crlf.win_line_end, b'\r\n')
        self.assertEqual(lf2crlf.unix_line_end, b'\n')
{'fraction_non_alphanumeric': 0.11169744942832015, 'fraction_numerical': 0.025065963060686015, 'mean_word_length': 3.0697674418604652, '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': '457351', 'n_tokens_mistral': 931, 'n_tokens_neox': 844, 'n_words': 118}