<commit_before>import os, sys, tempfile, shutil
import unittest

import hglib

class basetest(unittest.TestCase):
    def setUp(self):
        self._testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
            os.path.join(os.environ["HGTMP"], self.__class__.__name__)

        os.mkdir(self._testtmp)
        os.chdir(self._testtmp)
        # until we can run norepo commands in the cmdserver
        os.system('hg init')
        self.client = hglib.open()

    def tearDown(self):
        shutil.rmtree(self._testtmp)

    def append(self, path, *args):
        f = open(path, 'a')
        for a in args:
            f.write(str(a))
        f.close()<commit_msg>tests: be prepared for basetest.setUp not being called<commit_after>import os, sys, tempfile, shutil
import unittest

import hglib

class basetest(unittest.TestCase):
    def setUp(self):
        self._testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
            os.path.join(os.environ["HGTMP"], self.__class__.__name__)

        os.mkdir(self._testtmp)
        os.chdir(self._testtmp)
        # until we can run norepo commands in the cmdserver
        os.system('hg init')
        self.client = hglib.open()

    def tearDown(self):
        try:
            shutil.rmtree(self._testtmp)
        except AttributeError:
            pass # if our setUp was overriden

    def append(self, path, *args):
        f = open(path, 'a')
        for a in args:
            f.write(str(a))
        f.close()
{'fraction_non_alphanumeric': 0.12102772143340094, 'fraction_numerical': 0.0, 'mean_word_length': 2.3258426966292136, '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': '4577003', 'n_tokens_mistral': 486, 'n_tokens_neox': 485, 'n_words': 113}