Пример #1
0
    def test_unmatching_label(self):
        """
        Label that does not match, should be reported as non-matching
        """
        label = QLabel(text = 'Description')

        matcher = LabelMatcher(text = 'Intro')

        assert_that(matcher.matches(label), is_(equal_to(False)))
Пример #2
0
    def test_non_label(self):
        """
        Widget without text property should not match or crash the system
        """
        widget = QSvgWidget()

        matcher = LabelMatcher(text = 'Intro')

        assert_that(matcher.matches(widget), is_(equal_to(False)))
Пример #3
0
    def test_matching_label(self):
        """
        Label with matching text is reported matching
        """
        label = QLabel(text = 'Intro')

        matcher = LabelMatcher(text = 'Intro')

        assert_that(matcher.matches(label), is_(equal_to(True)))