def assert_text(): count = query.resolve_for(self) if not (matches_count(count, query.options) and (count > 0 or expects_none(query.options))): raise ExpectationNotMet(query.failure_message) return True
def assert_no_selector(): result = query.resolve_for(self) if result.matches_count and (len(result) > 0 or expects_none(query.options)): raise ExpectationNotMet(result.negative_failure_message) return True