<commit_before>import unittest
import tempfile
import os
import subprocess
import uuid
import re
from studio import git_util


class GitUtilTest(unittest.TestCase):

    def test_is_git(self):
        self.assertTrue(git_util.is_git())

    def test_is_not_git(self):
        self.assertFalse(git_util.is_git(tempfile.gettempdir()))

    def test_is_not_clean(self):
        filename = str(uuid.uuid4())
        subprocess.call(['touch', filename])
        is_clean = git_util.is_clean()
        os.remove(filename)
        self.assertFalse(is_clean)

    def test_repo_url(self):
        expected = re.compile(
            'https{0,1}://github\.com/ilblackdragon/studio(\.git){0,1}')
        actual = git_util.get_repo_url(remove_user=True)
        self.assertTrue(expected.match(actual) is not None)


if __name__ == "__main__":
    unittest.main()<commit_msg>fixed failing git util test<commit_after>import unittest
import tempfile
import os
import subprocess
import uuid
import re
from studio import git_util


class GitUtilTest(unittest.TestCase):

    def test_is_git(self):
        self.assertTrue(git_util.is_git())

    def test_is_not_git(self):
        self.assertFalse(git_util.is_git(tempfile.gettempdir()))

    def test_is_not_clean(self):
        filename = str(uuid.uuid4())
        subprocess.call(['touch', filename])
        is_clean = git_util.is_clean()
        os.remove(filename)
        self.assertFalse(is_clean)

    def test_repo_url(self):
        expected = re.compile(
            'https{0,1}://github\.com/studioml/studio(\.git){0,1}')
        actual = git_util.get_repo_url(remove_user=True)
        self.assertTrue(expected.match(actual) is not None)


if __name__ == "__main__":
    unittest.main()
{'fraction_non_alphanumeric': 0.1154068090017311, 'fraction_numerical': 0.005770340450086555, 'mean_word_length': 3.345864661654135, 'pattern_counts': {'":': 2, '<': 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': '1529424', 'n_tokens_mistral': 575, 'n_tokens_neox': 567, 'n_words': 101}