<commit_before>#!/usr/bin/python
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-

# The unittest framwork doesn't play nice with pylint:
#   pylint: disable-msg=C0103

from __future__ import absolute_import
import unittest
import svtplay.service.svtplay

class handleTest(unittest.TestCase):
    def setUp(self):
        self.svtplay = svtplay.service.svtplay.Svtplay()

    def handle_svtplay_se_test(self):
        self.assertTrue(self.svtplay.handle(
            "http://www.svtplay.se/video/1090393/del-9"))

    def handle_svt_se_test(self):
        self.assertTrue(self.svtplay.handle(
            "http://www.svt.se/nyheter/sverige/det-ar-en-dodsfalla"))

    def handle_dn_se_test(self):
        self.assertFalse(self.svtplay.handle(
            "http://www.dn.se/nyheter/sverige/det-ar-en-dodsfalla"))<commit_msg>Right module name in svtplay test<commit_after>#!/usr/bin/python
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-

# The unittest framwork doesn't play nice with pylint:
#   pylint: disable-msg=C0103

from __future__ import absolute_import
import unittest
import svtplay_dl.service.svtplay

class handleTest(unittest.TestCase):
    def setUp(self):
        self.svtplay = svtplay_dl.service.svtplay.Svtplay()

    def handle_svtplay_se_test(self):
        self.assertTrue(self.svtplay.handle(
            "http://www.svtplay.se/video/1090393/del-9"))

    def handle_svt_se_test(self):
        self.assertTrue(self.svtplay.handle(
            "http://www.svt.se/nyheter/sverige/det-ar-en-dodsfalla"))

    def handle_dn_se_test(self):
        self.assertFalse(self.svtplay.handle(
            "http://www.dn.se/nyheter/sverige/det-ar-en-dodsfalla"))
{'fraction_non_alphanumeric': 0.1404109589041096, 'fraction_numerical': 0.019406392694063926, 'mean_word_length': 3.339108910891089, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '6526355', 'n_tokens_mistral': 684, 'n_tokens_neox': 655, 'n_words': 92}