<commit_before># -*- Mode: Python -*-

import os
import glob
import sys
import shutil

import unittest

testLoader = unittest.TestLoader()

names = []
for filename in glob.iglob("test_*.py"):
  names.append(filename[:-3])
names.sort()

testSuite = testLoader.loadTestsFromNames(names)
runner = unittest.TextTestRunner(verbosity=2)
result = runner.run(testSuite)

# Cleanup
try:
  shutil.rmtree("./test_data/blobs")
except OSError:
  pass

if os.path.isfile("./test_data/test_gir.db"):
  os.remove("./test_data/test_gir.db")

if not result.wasSuccessful():<commit_msg>Remove SQLite database before running tests<commit_after># -*- Mode: Python -*-

import os
import glob
import sys
import shutil

import unittest

if os.path.isfile("./test_data/test_gir.db"):
  os.remove("./test_data/test_gir.db")

testLoader = unittest.TestLoader()

names = []
for filename in glob.iglob("test_*.py"):
  names.append(filename[:-3])
names.sort()

testSuite = testLoader.loadTestsFromNames(names)
runner = unittest.TextTestRunner(verbosity=2)
result = runner.run(testSuite)

# Cleanup
try:
  shutil.rmtree("./test_data/blobs")
except OSError:
  pass

if not result.wasSuccessful():
{'fraction_non_alphanumeric': 0.14432989690721648, 'fraction_numerical': 0.003436426116838488, 'mean_word_length': 5.067708333333333, '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': '7187704', 'n_tokens_mistral': 415, 'n_tokens_neox': 414, 'n_words': 84}