<commit_before>"""
Tests to make sure all components follow the appropriate API
"""
from holoviews import element
from holoviews.element import __all__
from holoviews.element.comparison import ComparisonTestCase


class TestParameterDeclarations(ComparisonTestCase):

    def test_element_group_parameter_declared_constant(self):
        for element_name in __all__:
            el = getattr(element, element_name)
            self.assertEqual(el.params('group').constant, True,
                             msg='Group parameter of element %s not constant' % element_name)<commit_msg>Added unit test to ensure the label parameter is always constant<commit_after>"""
Tests to make sure all components follow the appropriate API
"""
from holoviews import element
from holoviews.element import __all__ as all_elements
from holoviews.element.comparison import ComparisonTestCase


class TestParameterDeclarations(ComparisonTestCase):

    def test_element_group_parameter_declared_constant(self):
        for element_name in all_elements:
            el = getattr(element, element_name)
            self.assertEqual(el.params('group').constant, True,
                             msg='Group parameter of element %s not constant' % element_name)

    def test_element_label_parameter_declared_constant(self):
        """
        Checking all elements in case LabelledData.label is redefined
        """
        for element_name in all_elements:
            el = getattr(element, element_name)
            self.assertEqual(el.params('label').constant, True,
                             msg='Label parameter of element %s not constant' % element_name)

{'fraction_non_alphanumeric': 0.06622114216281895, 'fraction_numerical': 0.0, 'mean_word_length': 3.345646437994723, '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': '93876', 'n_tokens_mistral': 412, 'n_tokens_neox': 401, 'n_words': 126}