<commit_before>import pycosat

print pycosat.solve(
    5, [
    [1, -5, 4],
    [-1, 5, 3, 4],
    [-3, -4],
    ],
#    True
)

print pycosat.solve(
    2, [
    [-1],
    [1],
    ],
#    True
)<commit_msg>add unit test suite<commit_after>import unittest

import pycosat


tests = []

class TestSolver(unittest.TestCase):

    def test_sat_1(self):
        res = pycosat.solve(5, [[1, -5, 4],
                                [-1, 5, 3, 4],
                                [-3, -4]])
        self.assertEqual(res, [True, False, False, False, True])

    def test_unsat_2(self):
        res = pycosat.solve(2, [[-1],
                                [1]])
        self.assertEqual(res, False)

tests.append(TestSolver)

# ------------------------------------------------------------------------

def run(verbosity=1, repeat=1):
    suite = unittest.TestSuite()
    for cls in tests:
        for _ in range(repeat):
            suite.addTest(unittest.makeSuite(cls))

    runner = unittest.TextTestRunner(verbosity=verbosity)
    return runner.run(suite)


if __name__ == '__main__':
    run()
{'fraction_non_alphanumeric': 0.20512820512820512, 'fraction_numerical': 0.027472527472527472, 'mean_word_length': 1.5778301886792452, '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': '5852291', 'n_tokens_mistral': 381, 'n_tokens_neox': 366, 'n_words': 80}