Lines Matching refs:TestExpression
96 assert isinstance(new_expression, TestExpression)
98 if new_expression.variant == TestExpression.Variant.VarDef:
106 if expression.variant == TestExpression.Variant.Separator:
118 class TestExpression(EqualityMixin, PrintableMixin): class
151 return TestExpression(TestExpression.Variant.Separator, None, None)
155 return TestExpression(TestExpression.Variant.PlainText, None, text)
159 return TestExpression(TestExpression.Variant.Pattern, None, re.escape(text))
163 return TestExpression(TestExpression.Variant.Pattern, None, pattern)
167 assert re.match(TestExpression.Regex.rName, name)
168 return TestExpression(TestExpression.Variant.VarRef, name, None)
172 assert re.match(TestExpression.Regex.rName, name)
173 return TestExpression(TestExpression.Variant.VarDef, name, pattern)