<commit_before><commit_msg>Some tests<commit_after>import sys, os
import unittest
import yaml
import json

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import tammy

class PeerJ(unittest.TestCase):
    def test_pubtype(self):
        self.assertRaises(ValueError, tammy.from_peerj(200, 'paper'))
    def test_argtype(self):
        self.assertRaises(TypeError, tammy.from_peerj(['200'], 'article'))

def main():
    if sys.version_info[1] < 7 :
        unittest.main()
    else :
        unittest.main(verbosity=2)

if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.14185639229422067, 'fraction_numerical': 0.01576182136602452, 'mean_word_length': 4.017543859649122, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1730423', 'n_tokens_mistral': 205, 'n_tokens_neox': 197, 'n_words': 37}