Пример #1
0
 def test_equals(self):
     test_cases = [
         PathAndRelativityRestriction(PathRelativityVariants(set(), False)),
         PathAndRelativityRestriction(PathRelativityVariants({RelOptionType.REL_ACT}, True)),
         ArbitraryValueWStrRenderingRestriction.of_any(),
         ArbitraryValueWStrRenderingRestriction.of_single(WithStrRenderingType.STRING),
         ArbitraryValueWStrRenderingRestriction.of_single(WithStrRenderingType.PATH),
         ArbitraryValueWStrRenderingRestriction([WithStrRenderingType.PATH, WithStrRenderingType.LIST]),
     ]
     for restriction in test_cases:
         with self.subTest():
             sut.equals(restriction).apply_without_message(self, restriction)
Пример #2
0
def is_string() -> ValueRestriction:
    return ArbitraryValueWStrRenderingRestriction.of_single(
        WithStrRenderingType.STRING)