<commit_before>import stbt


class TruthyFrameObject(stbt.FrameObject):
    """
    The simplest possible FrameObject

    >>> frame = _load_frame("with-dialog")
    >>> bool(TruthyFrameObject(frame))
    True
    >>> TruthyFrameObject(frame)
    TruthyFrameObject(is_visible=True)
    """
    @property
    def is_visible(self):
        return True


class OrderedFrameObject(stbt.FrameObject):
    """
    FrameObject defines a default sort order based on the values of the<commit_msg>tests: Add a few more FrameObject tests<commit_after>import stbt


class TruthyFrameObject(stbt.FrameObject):
    """
    The simplest possible FrameObject

    >>> frame = _load_frame("with-dialog")
    >>> bool(TruthyFrameObject(frame))
    True
    >>> TruthyFrameObject(frame)
    TruthyFrameObject(is_visible=True)
    """
    @property
    def is_visible(self):
        return True


class FalseyFrameObject(stbt.FrameObject):
    """Properties aren't listed in repr if the FrameObject is falsey.

    >>> frame = _load_frame("with-dialog")
    >>> fo = FalseyFrameObject(frame)
    >>> bool(fo)
    False
    >>> fo
    FalseyFrameObject(is_visible=False)
    >>> print fo.public
    None
    >>> fo._private
    6
    """
    @property
    def is_visible(self):
        return False

    @property
    def public(self):
        return 5

    @property
    def _private(self):
        return 6


class FrameObjectWithProperties(stbt.FrameObject):
    """Only public properties are listed in repr.

    >>> frame = _load_frame("with-dialog")
    >>> FrameObjectWithProperties(frame)
    FrameObjectWithProperties(is_visible=True, public=5)
    """
    @property
    def is_visible(self):
        return True

    @property
    def public(self):
        return 5

    @property
    def _private(self):
        return 6


class FrameObjectThatCallsItsOwnProperties(stbt.FrameObject):
    """Private properties can be called from is_visible.

    >>> frame = _load_frame("with-dialog")
    >>> FrameObjectThatCallsItsOwnProperties(frame)
    FrameObjectThatCallsItsOwnProperties(is_visible=True)
    """
    @property
    def is_visible(self):
        return bool(self._private)

    @property
    def _private(self):
        return 6


class OrderedFrameObject(stbt.FrameObject):
    """
    FrameObject defines a default sort order based on the values of the
{'fraction_non_alphanumeric': 0.10042553191489362, 'fraction_numerical': 0.0029787234042553193, 'mean_word_length': 3.1684397163120566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '938655', 'n_tokens_mistral': 707, 'n_tokens_neox': 682, 'n_words': 163}