import re
from utils.Misc import Misc


class Assert:

    def __init__(self, target):
        self.target = target

    def is_class(self, name):
        assert Misc.class_name(self.target) in name

    def contains(self, text):
        assert text in self.target

    def is_equal(self, to):
        assert self.target == to

    def match_regex(self, regex):
        assert re.compile(regex).match(self.target) is not None

    def regex_not_match(self, regex):
        assert re.compile(regex).match(self.target) is None

5172d9788913ab7483bc18113e8b9987dbd79d0f
<mask token>


class Assert:
    <mask token>
    <mask token>

    def contains(self, text):
        assert text in self.target

    def is_equal(self, to):
        assert self.target == to
    <mask token>

    def regex_not_match(self, regex):
        assert re.compile(regex).match(self.target) is None

<mask token>


class Assert:
    <mask token>

    def is_class(self, name):
        assert Misc.class_name(self.target) in name

    def contains(self, text):
        assert text in self.target

    def is_equal(self, to):
        assert self.target == to

    def match_regex(self, regex):
        assert re.compile(regex).match(self.target) is not None

    def regex_not_match(self, regex):
        assert re.compile(regex).match(self.target) is None

<mask token>


class Assert:

    def __init__(self, target):
        self.target = target

    def is_class(self, name):
        assert Misc.class_name(self.target) in name

    def contains(self, text):
        assert text in self.target

    def is_equal(self, to):
        assert self.target == to

    def match_regex(self, regex):
        assert re.compile(regex).match(self.target) is not None

    def regex_not_match(self, regex):
        assert re.compile(regex).match(self.target) is None

import re
from utils.Misc import Misc


class Assert:

    def __init__(self, target):
        self.target = target

    def is_class(self, name):
        assert Misc.class_name(self.target) in name

    def contains(self, text):
        assert text in self.target

    def is_equal(self, to):
        assert self.target == to

    def match_regex(self, regex):
        assert re.compile(regex).match(self.target) is not None

    def regex_not_match(self, regex):
        assert re.compile(regex).match(self.target) is None
