コード例 #1
0
ファイル: num_files.py プロジェクト: emilkarlen/exactly
 def parse(self, token_parser: TokenParser) -> FilesMatcherSdv:
     matcher = self._integer_matcher_parser.parse_from_token_parser(
         token_parser)
     return property_matcher.PropertyMatcherSdv(
         matcher,
         property_getters.sdv_of_constant_primitive(_PropertyGetter()),
         property_matcher_describers.GetterWithMatcherAsChild())
コード例 #2
0
ファイル: sdv.py プロジェクト: emilkarlen/exactly
def glob_pattern_sdv(property_getter: PropertyGetter[FileMatcherModel, Path],
                     glob_pattern: StringSdv) -> FileMatcherSdv:
    return property_matcher.PropertyMatcherSdv(
        matches_glob_pattern.sdv__path(glob_pattern),
        property_getters.sdv_of_constant_primitive(property_getter, ),
        property_matcher_describers.GetterWithMatcherAsDetail(),
    )
コード例 #3
0
ファイル: sdv.py プロジェクト: emilkarlen/exactly
def reg_ex_sdv(property_getter: PropertyGetter[FileMatcherModel, str],
               regex: RegexSdv) -> FileMatcherSdv:
    return property_matcher.PropertyMatcherSdv(
        matches_regex.MatchesRegexSdv(regex, False),
        property_getters.sdv_of_constant_primitive(property_getter, ),
        property_matcher_describers.GetterWithMatcherAsDetail(),
    )
コード例 #4
0
def matcher(configuration: Configuration, selector: FileMatcherSdv,
            matcher_on_result: FilesMatcherSdv) -> FilesMatcherSdv:
    return property_matcher.PropertyMatcherSdv(
        matcher_on_result,
        _PrunedModelGetterSdv(configuration, selector),
        property_matcher_describers.GetterWithMatcherAsChild(),
    )
コード例 #5
0
ファイル: line_number.py プロジェクト: emilkarlen/exactly
def parse_line_number(parser: TokenParser) -> LineMatcherSdv:
    integer_matcher = _MATCHER_PARSER.parse_from_token_parser(parser)
    return property_matcher.PropertyMatcherSdv(
        integer_matcher,
        _operand_from_model_sdv(),
        property_matcher_describers.GetterWithMatcherAsChild(),
        _get_int_interval_of_int_matcher,
    )
コード例 #6
0
ファイル: num_lines.py プロジェクト: emilkarlen/exactly
def sdv(matcher: MatcherSdv[int]) -> StringMatcherSdv:
    return property_matcher.PropertyMatcherSdv(
        matcher,
        _operand_from_model_sdv(),
        property_matcher_describers.GetterWithMatcherAsChild()
    )