コード例 #1
0
    def test_path_rules_specifier(self):
        all_categories = style_categories()
        for (sub_paths, path_rules) in PATH_RULES_SPECIFIER:
            self.assertTrue(isinstance(path_rules, tuple), "Checking: " + str(path_rules))
            validate_filter_rules(path_rules, self._all_categories())

        # Try using the path specifier (as an "end-to-end" check).
        config = FilterConfiguration(path_specific=PATH_RULES_SPECIFIER)
        self.assertTrue(config.should_check("xxx_any_category", "xxx_non_matching_path"))
        self.assertTrue(config.should_check("xxx_any_category", "WebKitTools/WebKitAPITest/"))
        self.assertFalse(config.should_check("build/include", "WebKitTools/WebKitAPITest/"))
        self.assertFalse(config.should_check("readability/naming", "WebKit/qt/tests/qwebelement/tst_qwebelement.cpp"))
コード例 #2
0
    def test_path_rules_specifier(self):
        all_categories = style_categories()
        for (sub_paths, path_rules) in PATH_RULES_SPECIFIER:
            self.assertTrue(isinstance(path_rules, tuple),
                            "Checking: " + str(path_rules))
            validate_filter_rules(path_rules, self._all_categories())

        # Try using the path specifier (as an "end-to-end" check).
        config = FilterConfiguration(path_specific=PATH_RULES_SPECIFIER)
        self.assertTrue(
            config.should_check("xxx_any_category", "xxx_non_matching_path"))
        self.assertTrue(
            config.should_check("xxx_any_category",
                                "WebKitTools/WebKitAPITest/"))
        self.assertFalse(
            config.should_check("build/include", "WebKitTools/WebKitAPITest/"))
        self.assertFalse(
            config.should_check(
                "readability/naming",
                "WebKit/qt/tests/qwebelement/tst_qwebelement.cpp"))
コード例 #3
0
 def _all_categories(self):
     return style.style_categories()
コード例 #4
0
 def _all_categories(self):
     return style.style_categories()