<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import unittest

from i3pystatus.core.modules import IntervalModule


class IntervalModuleMetaTest(unittest.TestCase):

    def test_no_settings(self):
        class NoSettings(IntervalModule):
            pass
        self.assertTrue('interval' in NoSettings.settings)

    def test_no_interval_setting(self):
        class NoIntervalSetting(IntervalModule):
            settings = (('option', 'desc'),)
        self.assertEqual(NoIntervalSetting.settings,
                         (('option', 'desc'), 'interval'))

    def test_settings_with_interval(self):
        class SettingsInteval(IntervalModule):
            settings = ('option', 'interval')
        self.assertEqual(SettingsInteval.settings, ('option', 'interval'))

    def test_settings_with_interval_desc(self):
        class SetttingsIntervalDesc(IntervalModule):
            settings = (('interval', 'desc'),)
        self.assertEqual(SetttingsIntervalDesc.settings,
                         (('interval', 'desc'),))
<commit_msg>Added missing r to IntevalSettings in test_core_modules<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import unittest

from i3pystatus.core.modules import IntervalModule


class IntervalModuleMetaTest(unittest.TestCase):

    def test_no_settings(self):
        class NoSettings(IntervalModule):
            pass
        self.assertTrue('interval' in NoSettings.settings)

    def test_no_interval_setting(self):
        class NoIntervalSetting(IntervalModule):
            settings = (('option', 'desc'),)
        self.assertEqual(NoIntervalSetting.settings,
                         (('option', 'desc'), 'interval'))

    def test_settings_with_interval(self):
        class SettingsInterval(IntervalModule):
            settings = ('option', 'interval')
        self.assertEqual(SettingsInterval.settings, ('option', 'interval'))

    def test_settings_with_interval_desc(self):
        class SetttingsIntervalDesc(IntervalModule):
            settings = (('interval', 'desc'),)
        self.assertEqual(SetttingsIntervalDesc.settings,
                         (('interval', 'desc'),))

{'fraction_non_alphanumeric': 0.11748381128584644, 'fraction_numerical': 0.0018501387604070306, 'mean_word_length': 3.073446327683616, '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': '744352', 'n_tokens_mistral': 572, 'n_tokens_neox': 552, 'n_words': 108}