<commit_before>import os
import configparser
import shutil
import subprocess

# Setup
print("Setting up...")
shutil.copyfile("../halite.ini", "temp.ini")
shutil.copyfile("tests.ini", "../halite.ini")
parser = configparser.ConfigParser()
parser.read("../halite.ini")


# Website tests
print("Beginning website backend tests")
os.system("mysql -u "+parser["database"]["username"]+" -p"+parser["database"]["password"]+" < ../website/sql/Database.sql")
subprocess.call(["phpunit", "--stderr", "UserTest", "WebsiteTests.php"])

# Tear down
print("Almost done...")
shutil.copyfile("temp.ini", "../halite.ini")<commit_msg>Added env tests to runTests.py<commit_after>import os
import configparser
import shutil
import subprocess

# Setup
print("Setting up...")
shutil.copyfile("../halite.ini", "temp.ini")
shutil.copyfile("tests.ini", "../halite.ini")
parser = configparser.ConfigParser()
parser.read("../halite.ini")

# Website tests
print("Beginning website backend tests")
os.system("mysql -u "+parser["database"]["username"]+" -p"+parser["database"]["password"]+" < ../website/sql/Database.sql")
subprocess.call(["phpunit", "--stderr", "UserTest", "WebsiteTests.php"])

# Environment tests.
print(subprocess.Popen('cd environment; python3 testenv.py', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8'))

# Tear down
print("Almost done...")
shutil.copyfile("temp.ini", "../halite.ini")
{'fraction_non_alphanumeric': 0.20958512160228898, 'fraction_numerical': 0.001430615164520744, 'mean_word_length': 5.824390243902439, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5350423', 'n_tokens_mistral': 447, 'n_tokens_neox': 445, 'n_words': 90}