<commit_before>#!/usr/bin/env python
 # -*- coding: utf-8 -*-
import logging
import optparse
import os
import sys
import tempfile
import unittest
import warnings

import tablet
import utils

from checkers import checker
from checkers import write_configuration


# Dropping a table inexplicably produces a warning despite
# the "IF EXISTS" clause. Squelch these warnings.
warnings.simplefilter("ignore")


skip_teardown = False

# I need this mostly for mysql
destination_tablet = tablet.Tablet(62344, 6700, 3700)
source_tablets = [tablet.Tablet(62044, 6701, 3701),
                  tablet.Tablet(41983, 6702, 3702)]
tablets = [destination_tablet] + source_tablets

db_configuration = {
  "sources": [t.mysql_connection_parameters("test_checkers%i" % i) for i, t in enumerate(source_tablets)],
}


def setUpModule():
  utils.wait_procs([t.start_mysql() for t in tablets])
<commit_msg>Fixing this test for custom ports too.<commit_after>#!/usr/bin/env python
 # -*- coding: utf-8 -*-
import logging
import optparse
import os
import sys
import tempfile
import unittest
import warnings

import tablet
import utils

from checkers import checker


# Dropping a table inexplicably produces a warning despite
# the "IF EXISTS" clause. Squelch these warnings.
warnings.simplefilter("ignore")


skip_teardown = False

# I need this mostly for mysql
destination_tablet = tablet.Tablet(62344)
source_tablets = [tablet.Tablet(62044),
                  tablet.Tablet(41983)]
tablets = [destination_tablet] + source_tablets

db_configuration = {
  "sources": [t.mysql_connection_parameters("test_checkers%i" % i) for i, t in enumerate(source_tablets)],
}


def setUpModule():
  utils.wait_procs([t.start_mysql() for t in tablets])

{'fraction_non_alphanumeric': 0.09487776484284051, 'fraction_numerical': 0.03259604190919674, 'mean_word_length': 4.8074324324324325, 'pattern_counts': {'":': 2, '<': 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': '6473194', 'n_tokens_mistral': 590, 'n_tokens_neox': 537, 'n_words': 164}