<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
from datetime import datetime

from bin.filecheck import KittenGroomerFileCheck


def save_logs(groomer, test_description):
    divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
    test_log_path = 'tests/{}.log'.format(test_description)
    time_now = str(datetime.now().time()) + '\n'
    with open(test_log_path, 'wb+') as test_log:
        test_log_header = divider.format('TEST LOG')
        test_log.write(bytes(test_log_header, encoding='utf-8'))<commit_msg>Add condition skip to filecheck logging tests<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
from datetime import datetime

import pytest

try:
    from bin.filecheck import KittenGroomerFileCheck
    NODEPS = False
except ImportError:
    NODEPS = True
pytestmark = pytest.mark.skipif(NODEPS, reason="Dependencies aren't installed")


def save_logs(groomer, test_description):
    divider = ('=' * 10 + '{}' + '=' * 10 + '\n')
    test_log_path = 'tests/{}.log'.format(test_description)
    time_now = str(datetime.now().time()) + '\n'
    with open(test_log_path, 'wb+') as test_log:
        test_log_header = divider.format('TEST LOG')
        test_log.write(bytes(test_log_header, encoding='utf-8'))
{'fraction_non_alphanumeric': 0.15250198570293885, 'fraction_numerical': 0.009531374106433678, 'mean_word_length': 4.0199203187251, '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': '1187627', 'n_tokens_mistral': 437, 'n_tokens_neox': 423, 'n_words': 91}