<commit_before>import logging
import os
import unittest
from argparse import Namespace
from tempfile import NamedTemporaryFile

from tabpy_server.app.app import TabPyApp
from tabpy_server.app.ConfigParameters import ConfigParameters

try:
    from unittest.mock import patch, call
except ImportError:
    from mock import patch, call


class TestPasswordFile(unittest.TestCase):
    def __init__(self, *args, **kwargs):
        super(TestPasswordFile, self).__init__(*args, **kwargs)
        self.config_file = None
        self.pwd_file = None
        self.cwd = os.getcwd()
        self.tabpy_cwd = os.path.join(self.cwd, 'tabpy-server', 'tabpy_server')

    def setUp(self):
        os.chdir(self.tabpy_cwd)
        self.config_file = NamedTemporaryFile(mode='w', delete=False)
        self.config_file.close()<commit_msg>Code review feedback from WillAyd<commit_after>import logging
import pathlib
import os
import unittest
from argparse import Namespace
from tempfile import NamedTemporaryFile

from tabpy_server.app.app import TabPyApp
from tabpy_server.app.ConfigParameters import ConfigParameters

from unittest.mock import patch, call

class TestPasswordFile(unittest.TestCase):
    def setUp(self):
        self.cwd = pathlib.Path.cwd()
        self.tabpy_cwd = self.cwd / 'tabpy-server' / 'tabpy_server'
        os.chdir(self.tabpy_cwd)

        self.config_file = NamedTemporaryFile(mode='w', delete=False)
        self.config_file.close()
{'fraction_non_alphanumeric': 0.08683666436940041, 'fraction_numerical': 0.0, 'mean_word_length': 3.9896907216494846, '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': '2262068', 'n_tokens_mistral': 454, 'n_tokens_neox': 450, 'n_words': 108}