<commit_before>#! /usr/bin/python
# --*-- coding:utf-8 --*--
u"""
Test code
"""

import unittest
import pycubicspline


class Test(unittest.TestCase):

    def test_1(self):
        x = [-0.5, 0.0, 0.5, 1.0, 1.5]
        y = [3.2, 2.7, 6, 5, 6.5]
        sp = pycubicspline.Spline(x, y)
        self.assertEqual(sp.a[0], 3.2)
        self.assertEqual(sp.a[1], 2.7)
        self.assertEqual(sp.a[2], 6.0)
        self.assertEqual(sp.a[3], 5.0)


if __name__ == '__main__':
    unittest.main()<commit_msg>add test<commit_after>#! /usr/bin/python
# --*-- coding:utf-8 --*--
u"""
Test code
"""

import unittest
import pycubicspline


class Test(unittest.TestCase):

    def test_param(self):
        x = [-0.5, 0.0, 0.5, 1.0, 1.5]
        y = [3.2, 2.7, 6, 5, 6.5]
        sp = pycubicspline.Spline(x, y)
        self.assertEqual(sp.a[0], 3.2)
        self.assertEqual(sp.a[1], 2.7)
        self.assertEqual(sp.a[2], 6.0)
        self.assertEqual(sp.a[3], 5.0)

        self.assertEqual(sp.b[0], -3.7392857142857139)
        self.assertEqual(sp.b[1], 4.4785714285714278)
        self.assertEqual(sp.b[2], 2.6249999999999991)


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.1958939264328486, 'fraction_numerical': 0.10008554319931566, 'mean_word_length': 2.3333333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '4011009', 'n_tokens_mistral': 563, 'n_tokens_neox': 498, 'n_words': 88}